This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-fence.git

commit 55ee1eb752232b110d1c446ba9a96744d42dbc15
Author: liubao <[email protected]>
AuthorDate: Thu Aug 15 15:49:45 2024 +0800

    remove contracts page
---
 admin-website/src/main/web/src/locale/en-US.ts     |   4 +-
 admin-website/src/main/web/src/locale/zh-CN.ts     |   4 +-
 .../main/web/src/router/routes/modules/cloud.ts    |  12 -
 .../cloud/contracts/components/create/index.vue    | 206 -----------
 .../cloud/contracts/components/delete/index.vue    | 118 -------
 .../cloud/contracts/components/edit/index.vue      | 216 ------------
 .../src/views/cloud/contracts/hwcClient.service.ts |  18 -
 .../main/web/src/views/cloud/contracts/index.vue   | 377 ---------------------
 .../web/src/views/cloud/contracts/locale/en-US.ts  |  29 --
 .../web/src/views/cloud/contracts/locale/zh-CN.ts  |  27 --
 .../web/src/views/cloud/problems/locale/en-US.ts   |   3 +
 .../web/src/views/cloud/problems/locale/zh-CN.ts   |   3 +
 12 files changed, 10 insertions(+), 1007 deletions(-)

diff --git a/admin-website/src/main/web/src/locale/en-US.ts 
b/admin-website/src/main/web/src/locale/en-US.ts
index 2bda365..f8f8a9b 100644
--- a/admin-website/src/main/web/src/locale/en-US.ts
+++ b/admin-website/src/main/web/src/locale/en-US.ts
@@ -20,7 +20,7 @@ import localeUserSetting from 
'@/views/user/setting/locale/en-US';
 
 import localekanban from '@/views/board/locale/en-US';
 
-import localeContracts from '@/views/cloud/contracts/locale/en-US';
+import localeProblems from '@/views/cloud/problems/locale/en-US';
 
 import localeSettings from './en-US/settings';
 
@@ -60,6 +60,6 @@ export default {
   ...localeUserSetting,
   ...localeDetailForm,
   ...localekanban,
-  ...localeContracts,
+  ...localeProblems,
   ...localeHttpError,
 };
diff --git a/admin-website/src/main/web/src/locale/zh-CN.ts 
b/admin-website/src/main/web/src/locale/zh-CN.ts
index b797bfd..bcd063c 100644
--- a/admin-website/src/main/web/src/locale/zh-CN.ts
+++ b/admin-website/src/main/web/src/locale/zh-CN.ts
@@ -20,7 +20,7 @@ import localeUserSetting from 
'@/views/user/setting/locale/zh-CN';
 
 import localekanban from '@/views/board/locale/zh-CN';
 
-import localeContracts from '@/views/cloud/contracts/locale/zh-CN';
+import localeProblems from '@/views/cloud/problems/locale/zh-CN';
 
 import localeSettings from './zh-CN/settings';
 
@@ -60,6 +60,6 @@ export default {
   ...localeUserSetting,
   ...localeDetailForm,
   ...localekanban,
-  ...localeContracts,
+  ...localeProblems,
   ...localeHttpError,
 };
diff --git a/admin-website/src/main/web/src/router/routes/modules/cloud.ts 
b/admin-website/src/main/web/src/router/routes/modules/cloud.ts
index 5cc4665..1a63f2a 100644
--- a/admin-website/src/main/web/src/router/routes/modules/cloud.ts
+++ b/admin-website/src/main/web/src/router/routes/modules/cloud.ts
@@ -13,18 +13,6 @@ export default {
     roles: [],
   },
   children: [
-    {
-      path: 'contracts',
-      name: 'Contracts',
-      id: 'Contracts',
-      label: 'Contracts',
-      component: () => import('@/views/cloud/contracts/index.vue'),
-      meta: {
-        locale: 'menu.cloud.contracts',
-        requiresAuth: true,
-        roles: [RoleType.admin, RoleType.user],
-      },
-    },
     {
       path: 'Problems',
       name: 'Problems',
diff --git 
a/admin-website/src/main/web/src/views/cloud/contracts/components/create/index.vue
 
b/admin-website/src/main/web/src/views/cloud/contracts/components/create/index.vue
deleted file mode 100644
index 893e0e6..0000000
--- 
a/admin-website/src/main/web/src/views/cloud/contracts/components/create/index.vue
+++ /dev/null
@@ -1,206 +0,0 @@
-<template>
-  <div class="container-create">
-    <h3>{{ $t('menu.cloud.create') }}</h3>
-    <div class="contain">
-      <tiny-form
-        ref="ruleForm"
-        :model="createData"
-        :rules="rules"
-        :validate-on-rule-change="isvalidate"
-        :label-align="true"
-        label-position="left"
-        label-width="110px"
-      >
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item :label="$t('menu.cloud.name')" prop="name">
-              <div>
-                <tiny-input v-model="createData.name"></tiny-input>
-                <div class="tip">{{ $t('menu.cloud.tip') }}</div>
-              </div>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item :label="$t('menu.cloud.customer')" prop="customer">
-              <tiny-input v-model="createData.customer"></tiny-input>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item
-              :label="$t('menu.cloud.description')"
-              prop="description"
-            >
-              <tiny-input
-                v-model="createData.description"
-                type="textarea"
-              ></tiny-input>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item class="btn">
-              <tiny-button type="primary" @click="handleSubmit">{{
-                $t('menu.cloud.sure')
-              }}</tiny-button>
-              <tiny-button @click="handleCancel">{{
-                $t('menu.cloud.cancel')
-              }}</tiny-button>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-      </tiny-form>
-    </div>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import { ref, reactive, computed, defineEmits, defineExpose } from 'vue';
-  import { useI18n } from 'vue-i18n';
-  import {
-    Form as TinyForm,
-    FormItem as TinyFormItem,
-    Row as TinyRow,
-    Col as TinyCol,
-    Input as TinyInput,
-    Button as TinyButton,
-    Modal,
-  } from '@opentiny/vue';
-
-  // 注册
-  const { t } = useI18n();
-  const ruleForm = ref();
-
-  // 校验格式
-  const validatePass = (
-    rule: any,
-    value: string,
-    callback: (arg0: Error | undefined) => void
-  ) => {
-    // eslint-disable-next-line no-useless-escape
-    const nameRe =
-      
/^([a-zA-Z0-9]|[\u4e00-\u9fa5])([a-zA-Z0-9._:()()、:\/-]|[\u4e00-\u9fa5]){2,254}$/;
 // eslint-disable-line
-    if (!nameRe.test(value)) {
-      callback(new Error(t('menu.cloud.tip')));
-    } else {
-      if (ruleForm.value.password !== '') {
-        ruleForm.value.validateField('password');
-      }
-      callback(undefined);
-    }
-  };
-
-  let createData = reactive({
-    name: '',
-    customer: '',
-    description: '',
-  });
-
-  let isvalidate = ref(true);
-
-  const rules = computed(() => {
-    return {
-      name: [
-        {
-          required: true,
-          message: t('menu.cloud.verification'),
-          trigger: 'blur',
-        },
-        { validator: validatePass, trigger: 'blur' },
-      ],
-      customer: [
-        {
-          required: false,
-          trigger: 'blur',
-        },
-      ],
-      description: [
-        {
-          required: false,
-          trigger: 'change',
-        },
-      ],
-    };
-  });
-
-  // 定义派发事件
-  const emit = defineEmits(['myclick', 'mycancel']);
-
-  const resultData = () => {
-    return createData;
-  };
-
-  const handleCancel = () => {
-    emit('mycancel');
-  };
-
-  // 注册提交
-  const handleSubmit = () => {
-    ruleForm.value.validate((e: any) => {
-      if (e) {
-        let data: any = reactive({
-          username: createData.name,
-        });
-        Modal.message({
-          message: t('login.form.registerPass'),
-          status: 'success',
-        });
-        emit('myclick');
-      } else {
-        Modal.message({
-          message: t('login.form.registerError'),
-          status: 'warning',
-        });
-      }
-    });
-  };
-
-  defineExpose({
-    resultData,
-  });
-</script>
-
-<style scoped lang="less">
-  .container-edit {
-    h3 {
-      width: 72px;
-      height: 25px;
-      color: #202e54;
-      font-weight: bolder;
-      font-size: 18px;
-      line-height: 25px;
-      text-align: left;
-    }
-  }
-
-  .contain {
-    width: 90%;
-    margin-top: 10%;
-    color: var(--ti-common-color-text-secondary);
-    font-size: var(--ti-default-font-size);
-    line-height: var(--ti-formfield-item-required-label-line-height);
-
-    .tip {
-      color: #999;
-      font-size: var(--ti-common-font-size-base);
-    }
-
-    .btn {
-      margin-top: 6%;
-
-      :deep(.tiny-button) {
-        width: 100px;
-        height: 36px;
-        border-radius: 4px;
-      }
-    }
-
-    :deep(.row-flex) {
-      padding-bottom: 20px;
-    }
-  }
-</style>
diff --git 
a/admin-website/src/main/web/src/views/cloud/contracts/components/delete/index.vue
 
b/admin-website/src/main/web/src/views/cloud/contracts/components/delete/index.vue
deleted file mode 100644
index 38f49a3..0000000
--- 
a/admin-website/src/main/web/src/views/cloud/contracts/components/delete/index.vue
+++ /dev/null
@@ -1,118 +0,0 @@
-<template>
-  <div class="container-del">
-    <h3>{{ $t('menu.cloud.del') }}</h3>
-    <div class="contain">
-      <img src="@/assets/images/deleted.png" alt="deleted" />
-      <div class="contain-main">
-        <div>
-          {{ $t('menu.cloud.askDel') }}
-          <b>{{ $t('menu.cloud.askContracts') }}</b
-          >?
-        </div>
-        <div class="title"
-          >{{ $t('menu.contracts.name') }}&nbsp;{{ props.init.name }}</div
-        >
-        <div>
-          {{ $t('menu.cloud.askInput') }}
-          <span class="del">DELETE</span>
-          {{ $t('menu.cloud.askSure') }}
-        </div>
-        <tiny-input v-model="value"></tiny-input>
-        <div class="btn">
-          <tiny-button type="danger" @click="handleSubmit">
-            {{ $t('menu.cloud.sure') }}
-          </tiny-button>
-          <tiny-button @click="handleCancel">
-            {{ $t('menu.cloud.cancel') }}
-          </tiny-button>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import { ref, defineEmits, defineProps } from 'vue';
-  import { useI18n } from 'vue-i18n';
-  import {
-    Input as TinyInput,
-    Button as TinyButton,
-    Modal,
-  } from '@opentiny/vue';
-
-  // 注册
-  const { t } = useI18n();
-  const value = ref('');
-  const props = defineProps({
-    init: Object as any,
-  });
-
-  // 定义派发事件
-  const emit = defineEmits(['myclick', 'mycancel']);
-
-  const handleCancel = () => {
-    emit('mycancel');
-  };
-
-  // 注册提交
-  const handleSubmit = () => {
-    if (value.value.trim() === 'DELETE') {
-      Modal.message({
-        message: t('menu.cloud.delpass'),
-        status: 'success',
-      });
-      emit('myclick');
-    } else {
-      Modal.message({
-        message: t('login.form.registerError'),
-        status: 'warning',
-      });
-    }
-  };
-</script>
-
-<style scoped lang="less">
-  .container-del {
-    h3 {
-      height: 25px;
-      color: #202e54;
-      font-weight: bolder;
-      font-size: 18px;
-      line-height: 25px;
-      text-align: left;
-    }
-  }
-
-  .contain {
-    display: flex;
-    justify-content: space-around;
-    margin-top: 10%;
-
-    img {
-      width: 38px;
-      height: 33px;
-    }
-
-    .contain-main {
-      width: 430px;
-    }
-
-    .btn {
-      margin-top: 6%;
-
-      :deep(.tiny-button) {
-        width: 100px;
-        height: 36px;
-        border-radius: 4px;
-      }
-    }
-
-    .del {
-      color: red;
-    }
-
-    div {
-      margin-bottom: 3%;
-    }
-  }
-</style>
diff --git 
a/admin-website/src/main/web/src/views/cloud/contracts/components/edit/index.vue
 
b/admin-website/src/main/web/src/views/cloud/contracts/components/edit/index.vue
deleted file mode 100644
index eea2bf7..0000000
--- 
a/admin-website/src/main/web/src/views/cloud/contracts/components/edit/index.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-<template>
-  <div class="container-edit">
-    <h3>{{ $t('menu.cloud.edit') }}</h3>
-    <div class="contain">
-      <tiny-form
-        ref="ruleForm"
-        :model="createData"
-        :rules="rules"
-        :validate-on-rule-change="isvalidate"
-        :label-align="true"
-        label-position="left"
-        label-width="110px"
-      >
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item :label="$t('menu.cloud.name')" prop="name">
-              <div>
-                <tiny-input v-model="createData.name"></tiny-input>
-                <div class="tip">{{ $t('menu.cloud.tip') }}</div>
-              </div>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item :label="$t('menu.cloud.customer')" prop="customer">
-              <tiny-input v-model="createData.customer"></tiny-input>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item
-              :label="$t('menu.cloud.description')"
-              prop="description"
-            >
-              <tiny-input
-                v-model="createData.description"
-                type="textarea"
-              ></tiny-input>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-        <tiny-row :flex="true">
-          <tiny-col>
-            <tiny-form-item class="btn">
-              <tiny-button type="primary" @click="handleSubmit">{{
-                $t('menu.cloud.sure')
-              }}</tiny-button>
-              <tiny-button @click="handleCancel">{{
-                $t('menu.cloud.cancel')
-              }}</tiny-button>
-            </tiny-form-item>
-          </tiny-col>
-        </tiny-row>
-      </tiny-form>
-    </div>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import {
-    ref,
-    reactive,
-    computed,
-    defineEmits,
-    defineExpose,
-    defineProps,
-  } from 'vue';
-  import { useI18n } from 'vue-i18n';
-  import {
-    Form as TinyForm,
-    FormItem as TinyFormItem,
-    Row as TinyRow,
-    Col as TinyCol,
-    Input as TinyInput,
-    Button as TinyButton,
-    Modal,
-  } from '@opentiny/vue';
-
-  // 注册
-  const { t } = useI18n();
-  const ruleForm = ref();
-  const props = defineProps({
-    // eslint-disable-next-line vue/require-prop-types
-    init: {} as any,
-  });
-
-  // 校验格式
-  const validatePass = (
-    rule: any,
-    value: string,
-    callback: (arg0: Error | undefined) => void
-  ) => {
-    // eslint-disable-next-line no-useless-escape
-    const nameRe =
-      
/^([a-zA-Z0-9]|[\u4e00-\u9fa5])([a-zA-Z0-9._:()()、:\/-]|[\u4e00-\u9fa5]){2,254}$/;
 // eslint-disable-line
-    if (!nameRe.test(value)) {
-      callback(new Error(t('menu.cloud.tip')));
-    } else {
-      if (ruleForm.value.password !== '') {
-        ruleForm.value.validateField('password');
-      }
-      callback(undefined);
-    }
-  };
-
-  let createData = reactive({
-    name: props.init.name,
-    customer: props.init.customer,
-    description: props.init.description,
-  });
-
-  let isvalidate = ref(true);
-
-  const rules = computed(() => {
-    return {
-      name: [
-        {
-          required: true,
-          message: t('menu.cloud.delpass'),
-          trigger: 'blur',
-        },
-        { validator: validatePass, trigger: 'blur' },
-      ],
-      customer: [
-        {
-          required: false,
-          trigger: 'blur',
-        },
-      ],
-      description: [
-        {
-          required: false,
-          trigger: 'change',
-        },
-      ],
-    };
-  });
-
-  // 定义派发事件
-  const emit = defineEmits(['myclick', 'mycancel']);
-
-  const resultData = () => {
-    return createData;
-  };
-
-  const handleCancel = () => {
-    emit('mycancel');
-  };
-
-  // 注册提交
-  const handleSubmit = () => {
-    ruleForm.value.validate((e: any) => {
-      if (e) {
-        let data: any = reactive({
-          username: createData.name,
-        });
-        Modal.message({
-          message: t('menu.cloud.editpass'),
-          status: 'success',
-        });
-        emit('myclick');
-      } else {
-        Modal.message({
-          message: t('login.form.registerError'),
-          status: 'warning',
-        });
-      }
-    });
-  };
-
-  defineExpose({
-    resultData,
-  });
-</script>
-
-<style scoped lang="less">
-  .container-edit {
-    h3 {
-      height: 25px;
-      color: #202e54;
-      font-weight: bolder;
-      font-size: 18px;
-      line-height: 25px;
-      text-align: left;
-    }
-  }
-
-  .contain {
-    width: 90%;
-    margin-top: 10%;
-    color: var(--ti-common-color-text-secondary);
-    font-size: var(--ti-default-font-size);
-    line-height: var(--ti-formfield-item-required-label-line-height);
-
-    .tip {
-      color: #999;
-      font-size: var(--ti-common-font-size-base);
-    }
-
-    .btn {
-      margin-top: 6%;
-
-      :deep(.tiny-button) {
-        width: 100px;
-        height: 36px;
-        border-radius: 4px;
-      }
-    }
-
-    :deep(.row-flex) {
-      padding-bottom: 20px;
-    }
-  }
-</style>
diff --git 
a/admin-website/src/main/web/src/views/cloud/contracts/hwcClient.service.ts 
b/admin-website/src/main/web/src/views/cloud/contracts/hwcClient.service.ts
deleted file mode 100644
index efaf4d0..0000000
--- a/admin-website/src/main/web/src/views/cloud/contracts/hwcClient.service.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { HwcClient } from '@opentiny/hwc-client';
-
-export class HwcClientService {
-  static async apiRequest(
-    fnName: string,
-    params: any,
-    api = 'apig_contract',
-    apigroup = 'DEFAULT'
-  ) {
-    const response = await HwcClient.apigClient.exec(apigroup, api, {
-      query: { fn_name: fnName },
-      body: JSON.stringify(params),
-    });
-    const result = await response?.json();
-
-    return result?.data;
-  }
-}
diff --git a/admin-website/src/main/web/src/views/cloud/contracts/index.vue 
b/admin-website/src/main/web/src/views/cloud/contracts/index.vue
deleted file mode 100644
index a95ce6d..0000000
--- a/admin-website/src/main/web/src/views/cloud/contracts/index.vue
+++ /dev/null
@@ -1,377 +0,0 @@
-<template>
-  <Breadcrumb :items="['menu.cloud', 'menu.cloud.contracts']" />
-  <div class="container-contracts">
-    <div class="contracts-card">
-      <tiny-grid
-        v-if="update"
-        :ref="taskGrid"
-        :fetch-data="fetchDataOption"
-        :auto-load="true"
-        :pager="pagerConfig"
-        :loading="loading"
-        size="medium"
-        :auto-resize="true"
-      >
-        <template #toolbar>
-          <tiny-grid-toolbar>
-            <template #buttons="slotScope">
-              <div class="btn">
-                <span>{{ $t('menu.cloud.contracts') }}</span>
-                <tiny-button
-                  type="primary"
-                  @click="disTheme('create', slotScope.row)"
-                  >{{ $t('menu.cloud.create') }}</tiny-button
-                >
-              </div>
-            </template>
-          </tiny-grid-toolbar>
-        </template>
-
-        <tiny-grid-column type="index" width="40"></tiny-grid-column>
-        <tiny-grid-column
-          field="name"
-          :title="$t('menu.cloud.name')"
-          align="center"
-          sortable
-        ></tiny-grid-column>
-        <tiny-grid-column
-          field="id"
-          :title="$t('menu.cloud.id')"
-          align="center"
-        ></tiny-grid-column>
-        <tiny-grid-column
-          field="customer"
-          :title="$t('menu.cloud.customer')"
-          align="center"
-        ></tiny-grid-column>
-        <tiny-grid-column
-          field="description"
-          :title="$t('menu.cloud.description')"
-          align="center"
-        ></tiny-grid-column>
-        <tiny-grid-column
-          field="updatedAt"
-          :title="$t('menu.cloud.updatedAt')"
-          align="center"
-          sortable
-        ></tiny-grid-column>
-        <tiny-grid-column
-          :title="$t('searchTable.columns.operations')"
-          align="center"
-        >
-          <template #default="slotScope">
-            <span class="operation">
-              <a @click="disTheme('edit', slotScope.row)">
-                {{ $t('menu.cloud.editOpa') }}
-              </a>
-              &nbsp;
-              <a @click="disTheme('deletes', slotScope.row)">
-                {{ $t('menu.cloud.editDel') }}
-              </a>
-            </span>
-          </template>
-        </tiny-grid-column>
-      </tiny-grid>
-    </div>
-  </div>
-  <div v-if="display">
-    <tiny-modal
-      v-model="display"
-      :lock-scroll="false"
-      :show-header="false"
-      :show-footer="false"
-      type="confirm"
-      mask-closable="true"
-      :height="modalHeight"
-      width="589"
-      @confirm="confirmClick"
-      @close="closeClick"
-    >
-      <template #default>
-        <component
-          :is="title"
-          ref="content"
-          :init="init"
-          @myclick="confirmClick"
-          @mycancel="closeClick"
-        ></component>
-      </template>
-    </tiny-modal>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import { ref, reactive, toRefs } from 'vue';
-  import {
-    Grid as TinyGrid,
-    GridColumn as TinyGridColumn,
-    GridToolbar as TinyGridToolbar,
-    Button as TinyButton,
-    Pager as TinyPager,
-    Modal as tinyModal,
-  } from '@opentiny/vue';
-  import { sortTime } from '@/utils/time';
-  import { ApigInfo } from '@/types/global';
-  import { HwcClientService } from '@/utils/hwcClient.service';
-  import edit from './components/edit/index.vue';
-  import create from './components/create/index.vue';
-  import deletes from './components/delete/index.vue';
-
-  // 初始化请求数据
-  interface FilterOptions {
-    id: string;
-    name: string;
-    description: string;
-    customer: string;
-    updatedAt: string;
-  }
-
-  // 加载效果
-  const state = reactive<{
-    loading: boolean;
-    filterOptions: FilterOptions;
-  }>({
-    loading: false,
-    filterOptions: {} as FilterOptions,
-  });
-
-  const pagerConfig = reactive({
-    component: TinyPager,
-    attrs: {
-      currentPage: 1,
-      pageSize: 10,
-      pageSizes: [10, 20],
-      total: 10,
-      layout: 'total, prev, pager, next, jumper, sizes',
-    },
-  });
-
-  const update = ref(true);
-  const { loading } = toRefs(state);
-  const display = ref(false);
-  const title = ref();
-  const choose = ref('');
-  const content = ref();
-  const init = ref();
-  const taskGrid = ref();
-  const table = ref();
-  const modalHeight = ref('536');
-
-  const contractApigInfo: ApigInfo = {
-    apigName: 'apig_contract',
-    apigGroupName: 'group_contract',
-  };
-
-  // 获取初始数据
-  async function getContractsData(params: { query: string; field: string }) {
-    const result = await HwcClientService.apiRequest(
-      'getContracts',
-      params,
-      contractApigInfo
-    );
-
-    return result?.data;
-  }
-
-  // 请求数据接口方法
-  async function fetchData(params: {
-    pageIndex: number;
-    pageSize: number;
-    query: string;
-    field: string;
-  }) {
-    state.loading = true;
-    try {
-      table.value = await getContractsData(params);
-      let offset = (params.pageIndex - 1) * params.pageSize;
-      const data = table.value.sort(sortTime('updatedAt') as any);
-      return {
-        result: data.slice(offset, offset + params.pageSize),
-        page: {
-          total: table.value.length,
-        },
-      };
-    } finally {
-      update.value = true;
-      state.loading = false;
-    }
-  }
-
-  // 删除合同
-  async function delContracts(params: { id: string }) {
-    return HwcClientService.apiRequest('delContract', params, 
contractApigInfo);
-  }
-
-  // 编辑合同
-  async function editContracts(params: {
-    id: string;
-    name: string;
-    customer: string;
-    description: string;
-  }) {
-    return HwcClientService.apiRequest(
-      'editContract',
-      params,
-      contractApigInfo
-    );
-  }
-
-  // 创建合同
-  async function createContracts(params: {
-    name: string;
-    customer: string;
-    description: string;
-  }) {
-    return HwcClientService.apiRequest('addContract', params, 
contractApigInfo);
-  }
-
-  const fetchDataOption = reactive({
-    api: ({ page }: any) => {
-      const { currentPage, pageSize } = page;
-      return fetchData({
-        pageIndex: currentPage,
-        pageSize,
-        query: '',
-        field: 'name',
-      });
-    },
-  });
-
-  const disTheme = (item: string, data: any) => {
-    init.value = data;
-    choose.value = item;
-    display.value = !display.value;
-    if (item === 'edit') {
-      title.value = edit;
-      modalHeight.value = '536';
-    } else if (item === 'deletes') {
-      title.value = deletes;
-      modalHeight.value = '369';
-    } else {
-      title.value = create;
-      modalHeight.value = '536';
-    }
-  };
-
-  // 确认提交
-  async function confirmClick() {
-    display.value = false;
-    update.value = false;
-    if (choose.value === 'edit') {
-      const data = content.value.resultData();
-      const params = {
-        id: init.value.id,
-        name: data.name,
-        customer: data.customer,
-        description: data.description,
-      };
-      await editContracts(params);
-      fetchData({
-        pageIndex: 1,
-        pageSize: 10,
-        query: '',
-        field: 'name',
-      });
-    }
-    if (choose.value === 'deletes') {
-      const params = {
-        id: init.value.id,
-      };
-      await delContracts(params);
-      fetchData({
-        pageIndex: 1,
-        pageSize: 10,
-        query: '',
-        field: 'name',
-      });
-    }
-    if (choose.value === 'create') {
-      const data = content.value.resultData();
-      const params = {
-        name: data.name,
-        customer: data.customer,
-        description: data.description,
-      };
-      await createContracts(params);
-      fetchData({
-        pageIndex: 1,
-        pageSize: 10,
-        query: '',
-        field: 'name',
-      });
-    }
-  }
-
-  const closeClick = () => {
-    display.value = false;
-  };
-</script>
-
-<style scoped lang="less">
-
-  .container-contracts {
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    width: 100%;
-    height: calc(100% - 60px);
-    margin: 0 auto;
-    overflow: hidden;
-  }
-
-  // 覆盖组件样式 满足设计图
-  :deep(.tiny-grid-button__wrapper) {
-    width: 100%;
-  }
-
-  :deep(.tiny-pager) {
-    float: right;
-  }
-
-  :deep(.tiny-modal__box) {
-    background: #fff;
-    border-radius: 8px;
-    box-shadow: 0 0 30px 15px rgba(37, 43, 58, 0.3);
-  }
-
-  .contracts-card {
-    flex: 1 1 auto;
-    margin: 8px 10px;
-    padding: 0 30px;
-    overflow: auto;
-    background: #fff;
-    border-radius: 10px;
-    box-shadow: 0 0 8px 8px rgba(169, 174, 184, 0.05);
-  }
-
-  .btn {
-    display: flex;
-    flex-direction: column;
-    align-items: flex-start;
-    justify-content: space-around;
-    height: 100px;
-
-    span {
-      width: 56px;
-      height: 20px;
-      color: #202e54;
-      font-weight: normal;
-      font-size: 14px;
-      line-height: 20px;
-      text-align: left;
-    }
-
-    button {
-      display: block;
-      border-radius: 4px;
-    }
-  }
-
-  .operation {
-    color: #526ecc;
-  }
-
-  .content :deep(.tiny-grid) {
-    height: inherit;
-  }
-</style>
diff --git 
a/admin-website/src/main/web/src/views/cloud/contracts/locale/en-US.ts 
b/admin-website/src/main/web/src/views/cloud/contracts/locale/en-US.ts
deleted file mode 100644
index 52f555b..0000000
--- a/admin-website/src/main/web/src/views/cloud/contracts/locale/en-US.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export default {
-  'menu.cloud.locate.problems': 'Problem Locating',
-  'menu.cloud.contracts': 'Contract Management',
-  'menu.cloud.create': 'Create Contract',
-  'menu.cloud.edit': 'Edit Contract',
-  'menu.cloud.del': 'Delete Contract',
-  'menu.cloud.name': 'Project Name',
-  'menu.cloud.id': 'Contract No',
-  'menu.cloud.customer': 'Customer Name',
-  'menu.cloud.description': 'Description',
-  'menu.cloud.updatedAt': 'Creation Time',
-  'menu.cloud.editOpa': 'Edits',
-  'menu.cloud.editDel': 'Delete',
-  'menu.cloud.registerErro':
-    'The project name does not meet the verification rules',
-  'menu.cloud.sure': 'OK',
-  'menu.cloud.cancel': 'Cancel',
-  'menu.cloud.tip':
-    'The value can contain 3 to 255 characters, including Chinese characters, 
digits, hyphens (-), underscores (_), dots (.), slashes (/), parentheses (:) 
and colons (:) in Chinese and English formats, and periods (). The value can 
start with only English, Chinese characters, and digits.',
-  'menu.cloud.askDel': 'Are you sure you want to delete the following',
-  'menu.cloud.askContracts': 'Contract',
-  'menu.cloud.askInput': 'Input',
-  'menu.cloud.askSure': 'confirm',
-  'menu.cloud.verification': 'Verification failed',
-  'menu.cloud.editpass':
-    'If the verification is successful, the modification is successful',
-  'menu.cloud.delpass': 'Deleted successfully',
-  'menu.contracts.name': 'The contract name is:',
-};
diff --git 
a/admin-website/src/main/web/src/views/cloud/contracts/locale/zh-CN.ts 
b/admin-website/src/main/web/src/views/cloud/contracts/locale/zh-CN.ts
deleted file mode 100644
index 37df79f..0000000
--- a/admin-website/src/main/web/src/views/cloud/contracts/locale/zh-CN.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-export default {
-  'menu.cloud.locate.problems': '问题定位',
-  'menu.cloud.contracts': '合同管理',
-  'menu.cloud.create': '创建合同',
-  'menu.cloud.edit': '编辑合同',
-  'menu.cloud.del': '删除合同',
-  'menu.cloud.name': '项目名称:',
-  'menu.cloud.id': '合同编号',
-  'menu.cloud.customer': '客户名称:',
-  'menu.cloud.description': '项目描述:',
-  'menu.cloud.updatedAt': '创建时间',
-  'menu.cloud.editOpa': '编辑',
-  'menu.cloud.editDel': '删除',
-  'menu.cloud.registerErro': '项目名称不满足校验规则',
-  'menu.cloud.sure': '确认',
-  'menu.cloud.cancel': '取消',
-  'menu.cloud.tip':
-    '支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号,且只能以英文、汉字和数字开头,3-255个字符。',
-  'menu.cloud.askDel': '您确定要删除以下',
-  'menu.cloud.askContracts': '合同',
-  'menu.cloud.askInput': '输入',
-  'menu.cloud.askSure': '确认',
-  'menu.cloud.verification': '校验不通过',
-  'menu.cloud.editpass': '校验通过, 修改成功',
-  'menu.cloud.delpass': '删除成功',
-  'menu.contracts.name': '合同名称为:',
-};
diff --git 
a/admin-website/src/main/web/src/views/cloud/problems/locale/en-US.ts 
b/admin-website/src/main/web/src/views/cloud/problems/locale/en-US.ts
new file mode 100644
index 0000000..d76c876
--- /dev/null
+++ b/admin-website/src/main/web/src/views/cloud/problems/locale/en-US.ts
@@ -0,0 +1,3 @@
+export default {
+  'menu.cloud.locate.problems': 'Problem Locating',
+};
diff --git 
a/admin-website/src/main/web/src/views/cloud/problems/locale/zh-CN.ts 
b/admin-website/src/main/web/src/views/cloud/problems/locale/zh-CN.ts
new file mode 100644
index 0000000..68fe01f
--- /dev/null
+++ b/admin-website/src/main/web/src/views/cloud/problems/locale/zh-CN.ts
@@ -0,0 +1,3 @@
+export default {
+  'menu.cloud.locate.problems': '问题定位',
+};

Reply via email to