tangning hace 7 meses
padre
commit
6e013f0582

+ 9 - 3
src/views/account/details/index.vue

@@ -7,7 +7,7 @@
       <Tabs tab-position="left" :tabBarStyle="tabBarStyle">
         <template v-for="item in settingList" :key="item.key">
           <TabPane :tab="item.name">
-            <component :is="item.component" />
+            <component :is="item.component" :userName="userName" />
           </TabPane>
         </template>
       </Tabs>
@@ -16,7 +16,7 @@
 </template>
 
 <script lang="ts">
-  import { defineComponent } from 'vue';
+  import { defineComponent, computed } from 'vue';
   import { Tabs } from 'ant-design-vue';
   import { ScrollContainer } from '/@/components/Container/index';
   import { settingList } from './data';
@@ -24,7 +24,9 @@
 
   import Overview from '../overview/index.vue';
   import OrderList from './OrderList.vue';
-  import Product from '../product/index.vue';
+  // import Product from '../product/index.vue';
+  import Product from '/@/views/productOperation/cameraScene.vue';
+  import { otherInfoStore } from '/@/store/modules/other';
 
   export default defineComponent({
     components: {
@@ -37,6 +39,9 @@
     },
     setup() {
       const router = useRouter();
+      const otherInfo = otherInfoStore();
+      const OverviewInfo = computed(() => otherInfo.getOverviewInfo);
+      const { userName } = OverviewInfo.value;
       function routerGo(){
           router.go(-1)
       }
@@ -44,6 +49,7 @@
         routerGo,
         prefixCls: 'account-setting Level2Tab',
         settingList,
+        userName,
         tabBarStyle: {
           width: '220px',
         },

+ 14 - 10
src/views/productOperation/cameraScene.vue

@@ -20,7 +20,7 @@
         :rowSelection="tableType == 3 ? false : rowSelection"
       >
         <template #toolbar>
-          <a-button type="primary" @click="handleMoveAll" v-if="tableType != 3 && getCheckPerm('scenes-move-batch')"> 批量迁移</a-button>
+          <a-button type="primary" @click="handleMoveAll" v-if="tableType != 3 && tableType != 57 && tableType != 58 && getCheckPerm('scenes-move-batch')"> 批量迁移</a-button>
         </template>
         <template #status="{ record }">
           <span v-if="record.status != '-1'">{{ record.statusString }}</span>
@@ -54,7 +54,7 @@
               {
                 label: '迁移',
                 disabled: !(record.status == 1 || record.status == -2),
-                ifShow: getTypeCheckPerm('scenes-move') && tableType != 3,
+                ifShow: getTypeCheckPerm('scenes-move') && tableType != 3 && tableType != 57 && tableType != 58,
                 onClick: handleMove.bind(null, record),
               },
               {
@@ -65,7 +65,7 @@
               {
                 label: '解冻',
                 disabled: !record.isColdStorage || !(record.status == 1 || record.status == -2),
-                ifShow: getTypeCheckPerm('scenes-thaw'),
+                ifShow: getTypeCheckPerm('scenes-thaw') && tableType != 57 && tableType != 58,
                 onClick: handleColdStorage.bind(null, record),
               },
               {
@@ -88,7 +88,7 @@
               {
                 label: '复制',
                 disabled: !(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
-                ifShow: getTypeCheckPerm('scenes-copy') && tableType != 3,
+                ifShow: getTypeCheckPerm('scenes-copy') && tableType != 3 && tableType != 57 && tableType != 58,
                 onClick: handleCopy.bind(null, record),
               },
               {
@@ -180,7 +180,10 @@
       [Tabs.name]: Tabs,
       [Tabs.TabPane.name]: Tabs.TabPane,
     },
-    setup() {
+    props: {
+      userName: String,
+    },
+    setup(props) {
       const { t } = useI18n();
       const { createMessage, createConfirm } = useMessage();
       const permissionStore = usePermissionStore();
@@ -198,7 +201,7 @@
         actionColOptions: {
           span: 24,
         },
-        schemas: getSchemas(),
+        schemas: getSchemas('', props.userName),
       };
       function cancelDownload() {
         downloadOption.value = {
@@ -218,7 +221,7 @@
         title: `场景列表`,
         columns: getColumns(false),
         // rowSelection: { type: 'checkbox' },
-        searchInfo: { type: tableType },
+        searchInfo: { type: tableType, userName: props.userName },
         useSearchForm: true,
         formConfig: searchFormSs,
         showTableSetting: true,
@@ -259,9 +262,9 @@
         let sgetForm = getForm();
         if(sgetForm){
           sgetForm.resetFields()
-          sgetForm.updateSchema(getSchemas(val))
+          sgetForm.updateSchema(getSchemas(val, props.userName))
         }
-        console.log('sgetForm', sgetForm);
+        console.log('sgetForm', sgetForm, val);
         setColumns(getColumns(val));
         clearSelectedRowKeys();
         reload();
@@ -281,7 +284,7 @@
       async function handleCopy(record: Recordable) {
         createConfirm({
           title: '复制场景',
-          content: '复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
+          content: '确定要复制场景吗?',
           onOk: async () => {
             sceneCopy({ num: record.num }).then(() => {
               message.success({
@@ -426,6 +429,7 @@
         rowSelection,
         clearSelectedRowKeys,
         getCheckPerm,
+        userName: props.userName,
       };
     },
   });

+ 6 - 2
src/views/productOperation/data.ts

@@ -3,7 +3,7 @@ const { t } = useI18n();
 import { Time } from '/@/components/Time';
 import { BasicColumn } from '/@/components/Table/src/types/table';
 import { h } from 'vue';
-export const getSchemas = (val) => {
+export const getSchemas = (val, userName) => {
   return [
     {
       field: 'sceneName',
@@ -33,6 +33,7 @@ export const getSchemas = (val) => {
       field: 'snCode',
       label: 'SN码',
       component: 'Input',
+      ifShow: val != 57 || val != 58,
       componentProps: {
         maxLength: 100,
       },
@@ -45,6 +46,7 @@ export const getSchemas = (val) => {
       field: 'userName',
       label: '绑定账号',
       component: 'Input',
+      ifShow: !userName,
       componentProps: {
         maxLength: 100,
       },
@@ -333,7 +335,7 @@ export const getviewColumns = () => {
   ];
 };
 export const getColumns = (val) => {
-  const isobj = val == 6;
+  const isobj = val == 6 || val == 57;
   return [
     {
       title: '场景标题',
@@ -398,6 +400,7 @@ export const getColumns = (val) => {
     {
       title: 'SN码',
       dataIndex: 'snCode',
+      ifShow: val != 57 && val != 58,
       width: 180,
     },
     {
@@ -438,6 +441,7 @@ export const getColumns = (val) => {
       title: '拍摄位置',
       dataIndex: 'addressComponent',
       width: 100,
+      ifShow: val != 57 && val != 58,
       customRender: ({ record }) => {
         if (!record.addressComponent) {
           return '-';