tangning 2 tahun lalu
induk
melakukan
b57c468308

+ 35 - 34
src/locales/lang/zh-CN/routes/product.ts

@@ -1,42 +1,43 @@
 export default {
-  addVstive:'新增版本',
-  newsTitle:'新闻标题',
-  newsAdd:'新增新闻',
-  source:'来源',
-  objTitle:'职位名称',
-  submitTitle:'提交时间',
-  mesgContent:'留言内容',
-  types:'设备类型',
-  minVersion:'最低版本号',
-  version:'版本号',
-  versionPlaceholder:'最新版本号',
-  versionTips:'(低于此版本号强制更新)',
-  description:'版本更新说明',
-  description_zh:'中文更新说明',
-  description_en:'英文更新说明',
-  file:'文件',
-  type:{
-    0:'旧双目相机',
-    1:'四维看看',
-    2:'四维看见',
-    3:'四维深时',
-    // 9:'四维看见',
-    // 10:'四维深时',
-    11:'四维深光',
+  addVstive: '新增版本',
+  newsTitle: '新闻标题',
+  newsAdd: '新增新闻',
+  source: '来源',
+  objTitle: '职位名称',
+  submitTitle: '提交时间',
+  mesgContent: '留言内容',
+  types: '设备类型',
+  minVersion: '最低版本号',
+  version: '版本号',
+  versionPlaceholder: '最新版本号',
+  versionTips: '(低于此版本号强制更新)',
+  description: '版本更新说明',
+  description_zh: '中文更新说明',
+  description_en: '英文更新说明',
+  file: '文件',
+  type: {
+    0: '旧双目相机',
+    1: '四维看看',
+    2: '四维看见',
+    3: '四维深时',
+    4: '四维看看',
+    9: '四维看见',
+    10: '四维深时',
+    11: '四维深光',
   },
-  outType:{
-    0:'正常销售',
-    4:'经销商',
-    1:'员工自用',
-    2:'礼品赠送',
-    3:'其他',
+  outType: {
+    0: '正常销售',
+    4: '经销商',
+    1: '员工自用',
+    2: '礼品赠送',
+    3: '其他',
   },
-  sdkType:{
-    1:'Unity',
-    2:'UE4',
+  sdkType: {
+    1: 'Unity',
+    2: 'UE4',
   },
   statusType: {
     0: '未发布',
     1: '已发布',
   },
-};
+};

+ 15 - 3
src/views/account/overview/AddDownModal.vue

@@ -2,7 +2,7 @@
   <BasicModal
     v-bind="$attrs"
     @register="register"
-    title="新增下载"
+    :title="fileFlow.title"
     @visible-change="handleVisibleChange"
     @cancel="resetFields"
     @ok="handleConfirm"
@@ -43,6 +43,7 @@
         file: null,
         id: '',
         type: 'down', //down-下载,equity-权益
+        title: '新增下载',
       });
       const { createMessage, createConfirm } = useMessage();
       const schemas: FormSchema[] = [
@@ -80,13 +81,24 @@
       let addListFunc = () => {};
       const [register, { closeModal }] = useModalInner((data) => {
         data && onDataReceive(data);
+        updateSchema([
+          {
+            field: 'useType',
+            componentProps: {
+              onChange: (value) => {
+                updateSchema({ field: 'projectNum', ifShow: value == '4' });
+              },
+            },
+          },
+        ]);
       });
       async function onDataReceive(data) {
         const res = await dincrementList();
         console.log('onDataReceive', data, res);
         resetFields();
         fileFlow.type = data.type;
-        fileFlow.id = data.id;
+        fileFlow.id = data.userId;
+        fileFlow.title = data.type == '1' ? '新增下载(四维看看)' : '新增下载(四维深时)';
         setFieldsValue(data);
       }
       async function handleConfirm() {
@@ -105,7 +117,7 @@
         try {
           const params = await validate();
           console.log('validate', params);
-          const res = await submitUrl({ userId: params.id, ...params });
+          const res = await submitUrl({ userId: fileFlow.id, downType:fileFlow.type, ...params });
           overviewInfo.value.surDownNum = overviewInfo.value.surDownNum + params.count;
           console.log('res', res);
           otherInfo.updateOverviewInfo();

+ 13 - 9
src/views/account/overview/AddModal.vue

@@ -54,6 +54,12 @@
           label: 'id',
         },
         {
+          field: 'userId',
+          component: 'Input',
+          show: false,
+          label: 'userId',
+        },
+        {
           field: 'incrementTypeId',
           component: 'ApiSelect',
           label: '权益类型',
@@ -74,9 +80,11 @@
             },
             onChange: (value) => {
               console.log('onChange', value);
+              let { monthQy = 1, count = 1 } = getFieldsValue()
+              let unitStr = value == '3' ? '个月' : '年';
               updateSchema([
                 { field: 'monthQy', ifShow: true, componentProps: { options: showOptions( value == '3' ? 12 : 5), } },
-                { field: 'incrementEndTime', componentProps: { disabled: value == '3' } },
+                { field: 'count', suffix: ( count * monthQy ) + unitStr }
               ]);
               setFieldsValue({
                 monthQy: 1,
@@ -122,10 +130,10 @@
           componentProps: {
             options: showOptions(5),
             onChange: (data) => {
-              let { incrementTypeId, counts = 1 } = getFieldsValue()
+              let { incrementTypeId, count = 1 } = getFieldsValue()
               let unit = incrementTypeId == '3' ? 'month' : 'year'
               let unitStr = incrementTypeId == '3' ? '个月' : '年';
-              updateSchema({ field: 'counts', suffix: ( counts * data ) + unitStr });
+              updateSchema({ field: 'count', suffix: ( count * data ) + unitStr });
               setFieldsValue({
                 incrementEndTime: dayjs().add(data, unit).format('YYYY-MM-DD'),
               });
@@ -136,7 +144,7 @@
           },
         },
         {
-          field: 'counts',
+          field: 'count',
           component: 'InputNumber',
           label: '新增权益数',
           required: true,
@@ -146,7 +154,7 @@
             onChange: (data = 1) => {
               let { incrementTypeId, monthQy = 1 } = getFieldsValue();
               let unit = incrementTypeId == '3' ? '个月' : '年';
-              updateSchema({ field: 'counts', suffix: ( monthQy * data ) + unit });
+              updateSchema({ field: 'count', suffix: ( monthQy * data ) + unit });
             },
           },
           colProps: {
@@ -239,13 +247,9 @@
           console.log('validate', params);
           const apiData = {
             ...params,
-            userId: params.id,
-            incrementEndTime: params.incrementEndTime,
-            count: params.counts,
           };
           const res = await submitUrl(apiData);
           overviewInfo.value.incrementCount = overviewInfo.value.incrementCount + apiData.count;
-          console.log('res', res);
           otherInfo.updateOverviewInfo();
           closeModal();
           resetFields();

+ 8 - 0
src/views/account/overview/caremModal.vue

@@ -66,6 +66,14 @@
           width: 120,
         },
         {
+          title: '设备类型',
+          dataIndex: 'type',
+          width: 150,
+          customRender: ({ record }) => {
+            return record.type ? t(`routes.product.type.${record.type}`) : '-';
+          },
+        },
+        {
           title: '激活时间',
           dataIndex: 'activatedTime',
           width: 150,

+ 0 - 1
src/views/account/overview/data.tsx

@@ -206,7 +206,6 @@ export const remarkschemas: FormSchema[] = [
   {
     field: 'remark',
     component: 'InputTextArea',
-    required: true,
     label: '备注',
     componentProps: {
       placeholder: '请输入钉钉审批单号',

+ 39 - 18
src/views/account/overview/index.vue

@@ -14,34 +14,48 @@
     </div>
     <a-divider />
     <div class="infodetail">
-      <div class="title">数据统计</div>
-      <div class="list" v-if="overviewInfo">
+      <div class="title">硬件产品</div>
+      <div class="list">
           <div class="list_item">
-            <div class="lable">权益数量</div>
+            <div class="lable">相机数量</div>
             <div class="value">
-              <div class="text">{{overviewInfo.incrementCount}}个</div>              
-              <Button type="primary" v-if="getCheckPerm('account-equityDetails')" size="small" @click="openInteresModal(true,{})"> 权益详情 </Button>
-              <Button type="primary" v-if="getCheckPerm('increment-add')" size="small" @click="handleAddEquity('equity')"> 新增权益 </Button>
+              <div class="text">{{overviewInfo.cameraCount}}台</div>              
+              <Button type="primary" size="small" v-if="getCheckPerm('account-cameraDetails')" @click="openCaremModal(true)"> 查看详情 </Button>
             </div>
           </div>
           <div class="list_item">
-            <div class="lable">剩余下载次数</div>
+            <div class="lable">场景数量</div>
             <div class="value">
-              <div class="text">{{overviewInfo.surDownNum}}次</div>              
-              <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleAddEquity('down')"> 新增下载 </Button>
+              <div class="text">{{overviewInfo.sceneNum}}个</div>              
             </div>
           </div>
+      </div>
+    </div>
+    <a-divider />
+    <div class="infodetail">
+      <div class="title">软件服务</div>
+      <div class="list" v-if="overviewInfo">
           <div class="list_item">
-            <div class="lable">相机数量</div>
+            <div class="lable">四维看看</div>
             <div class="value">
-              <div class="text">{{overviewInfo.cameraCount}}台</div>              
-              <Button type="primary" size="small" v-if="getCheckPerm('account-cameraDetails')" @click="openCaremModal(true)"> 查看详情 </Button>
+              <div class="text">专业会员 {{overviewInfo.incrementCount}}个</div>              
+              <Button type="primary" v-if="getCheckPerm('account-equityDetails')" size="small" @click="openInteresModal(true,{})"> 权益详情 </Button>
+              <Button type="primary" v-if="getCheckPerm('increment-add')" size="small" @click="handleAddEquity('equity')"> 新增权益 </Button>
             </div>
           </div>
           <div class="list_item">
-            <div class="lable">场景数量</div>
+            <div class="lable"></div>
             <div class="value">
-              <div class="text">{{overviewInfo.sceneNum}}个</div>              
+              <div class="text">下载次数 {{overviewInfo.surDownNum}}次</div>              
+              <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleaddDown('1')"> 新增下载 </Button>
+            </div>
+          </div>
+          
+          <div class="list_item">
+            <div class="lable">四维深时</div>
+            <div class="value">
+              <div class="text">下载次数 {{overviewInfo.surSSDownNum}}次</div>              
+              <Button type="primary" size="small" v-if="getCheckPerm('download-add')" @click="handleaddDown('2')"> 新增下载 </Button>
             </div>
           </div>
       </div>
@@ -85,8 +99,14 @@
       const overviewInfo = computed(() => otherInfo.getOverviewInfo);
       const permissionStore = usePermissionStore();
       const { getCheckPerm } = permissionStore;
-      function handleAddEquity(type:string){
-        console.log('type',type)
+      function handleaddDown(type: string) {
+        openAddDowmModal(true, {
+          ...overviewInfo.value,
+          type: type,
+        });
+      }
+      function handleAddEquity(type: string) {
+        console.log('type', type);
         if(type == 'down'){
           openAddDowmModal(true, {
           ...overviewInfo.value,
@@ -94,8 +114,8 @@
         });
         }else{
           openAddModal(true, {
-          ...overviewInfo.value,
           type,
+          userId:overviewInfo.value.id,
         });
         }
       }
@@ -118,6 +138,7 @@
         personData,
         overviewInfo,
         handleAddEquity,
+        handleaddDown,
         handleSetEquity,
         getCheckPerm,
       };
@@ -155,7 +176,7 @@
             margin-right: 30px;
           }
           .text{
-            width: 80px;
+            width: 130px;
             display: inline-block;
           }
         }

+ 4 - 1
src/views/account/overview/interesModal.vue

@@ -175,7 +175,10 @@
         fileFlow.id = data.id
       }
       async function handleDelete (record: Recordable) {
-        openAddModal(true, record);
+        openAddModal(true, {
+          userId: overviewInfo.value && overviewInfo.value.id,
+          ...record,
+        });
         // createConfirm({
         //   iconType: 'warning',
         //   title: () => h('span', '续费提示'),

+ 1 - 1
src/views/empower/camera.vue

@@ -122,7 +122,7 @@
         {
           title: '授权相机数量',
           ellipsis: true,
-          dataIndex: 'machineCode',
+          dataIndex: 'cameraNum',
           width: 120,
         },
         {

+ 1 - 1
src/views/empower/install.vue

@@ -113,7 +113,7 @@
         {
           title: '备注',
           ellipsis: true,
-          dataIndex: 'authorizeTime',
+          dataIndex: 'remark',
           width: 120,
         },
         {