tangning 10 月之前
父節點
當前提交
40504a50d4

+ 89 - 21
src/views/lanUser/adddetailsModal.vue

@@ -4,9 +4,33 @@
     @cancel="resetFields"
     @register="register"
     :title="title"
-    @ok="handleOk"
+    @ok="handlestd"
   >
-    <BasicForm @register="registerForm" />
+    <div class="BasicForms">
+      <Select
+        v-model:value="modelRef"
+        show-search
+        placeholder="请输入姓名/手机号码/身份证号码搜索"
+        style="width: 350px"
+        :default-active-first-option="false"
+        :show-arrow="false"
+        :filter-option="false"
+        not-found-content="暂无数据"
+        :options="options"
+        @search="fetchUser"
+        @change="handleChange"
+      />
+      <div class="from" v-if="active && active.name">
+        <div class="form-item">
+          <div>姓名</div>{{active.name}} </div>
+        <div class="form-item">
+          <div>手机号码</div>{{active.phone || '暂无手机号'}} </div>
+        <div class="form-item">
+          <div>身份证</div>{{active.idCard || '暂无身份证'}} </div>
+        <div class="form-item">
+          <div>平台</div>{{active.platformName || '未分配'}} </div>
+      </div>
+    </div>
   </BasicModal>
 </template>
 <script lang="ts">
@@ -18,25 +42,26 @@
   import { useMessage } from '/@/hooks/web/useMessage';
   import { useUserStore } from '/@/store/modules/user';
   import { debounce } from 'lodash-es';
+  import { Select } from 'ant-design-vue';
   import { jyPlatformlist, delplatformList } from '/@/api/jyUserPlatform/index'; //roleLIstApi
   import { platformallList, jyUserPlatformadd, queryByKey } from '/@/api/jyUserPlatform/index';
   const { t } = useI18n();
   export default defineComponent({
-    components: { BasicModal, BasicForm },
+    components: { BasicModal, BasicForm, Select },
     props: {
       userData: { type: Object },
     },
     emits: ['ok'],
     setup(_, context) {
-      const modelRef = ref({});
+      const modelRef = ref();
+      const active = ref({})
       const options = ref([]);
       const userStore = useUserStore();
       const userinfo = computed(() => userStore.getUserInfo);
       const preventAutoFill = ref(true);
       const { companyId } = userinfo.value;
       let lastFetchId = 0;
-      const fetchUser = debounce((e) => {
-        let value = e.target.value;
+      const fetchUser = debounce((value) => {
         if (!value) {
           return;
         }
@@ -44,13 +69,15 @@
         const fetchId = lastFetchId;
         options.value = [];
         setFieldsValue({
-          'id': null
+          id: null,
         });
         queryByKey({ queryKey: value }).then((res) => {
           console.log('queryByKey', res);
           const data = res.map((user) => ({
             ...user,
-            label: `${user.name}`,
+            label: `${user.name}/${user.phone || '暂无手机号码'}/${user.idCard || ''}/${
+              user.platformName || '未分配'
+            }`,
             value: user.id,
           }));
           options.value = data;
@@ -77,7 +104,7 @@
           componentProps: {
             placeholder: '请输入姓名/手机号码/身份证号码搜索',
             onChange: fetchUser,
-          }
+          },
         },
         {
           field: 'id',
@@ -103,7 +130,7 @@
         },
       ];
       const title = ref('添加用户');
-      const { createMessage } = useMessage();
+      const { createMessage, createConfirm } = useMessage();
       const [registerForm, { setFieldsValue, validate, updateSchema, resetFields }] = useForm({
         labelWidth: 120,
         schemas,
@@ -154,20 +181,38 @@
           permList: [],
         });
       }
+      handlestd(){
+        createConfirm({
+          title: '提示',
+          content: '该用户已属其他平台,确定为其更换平台?',
+          onOk: async () => {
+            handleOk()
+          },
+        });
+      }
       async function handleOk() {
-        let data = await validate();
-        let res = await jyUserPlatformadd({
-          id: data.id.value,
-          // platformId: data.id.platformId,
+        createConfirm({
+          title: '提示',
+          content: '该用户已属其他平台,确定为其更换平台?',
+          onOk: async () => {
+            let res = await jyUserPlatformadd({
+              id: modelRef,
+            });
+            context && context.emit('ok', res);
+            createMessage.success(t('common.optSuccess'));
+            closeModal();
+            resetFields();
+            sceneCopy({ num: record.num }).then((res) => {
+              message.success({
+                content: '复制成功',
+              });
+              reload();
+            });
+          },
         });
-        context && context.emit('ok', res);
-        createMessage.success(t('common.optSuccess'));
-        closeModal();
-        resetFields();
       }
-      function handleChange(value, b, a) {
-        console.log('value', value, b, a);
-        updateSchema({ field: 'projectNum', ifShow: value == '4' });
+      function handleChange(value, b ) {
+        active.value = b;
       }
       return {
         register,
@@ -178,7 +223,30 @@
         modelRef,
         handleOk,
         resetFields,
+        fetchUser,
+        options,
+        handleChange,
+        active,
       };
     },
   });
 </script>
+<style lang="less" scoped>
+  .BasicForms {
+    margin: 0 auto;
+    text-align: center;
+  }
+  .from{
+    width: 350px;
+    margin: 0 auto;
+    .form-item{
+      display: flex;
+      margin-top: 10px;
+      div{
+        width: 60px;
+        text-align: right;
+        margin-right: 10px;
+      }
+    }
+  }
+</style>

+ 2 - 2
src/views/lanUser/list.vue

@@ -202,7 +202,7 @@
             label: t('routes.staff.userName'),
             component: 'Input',
             componentProps: {
-              maxLength: 15,
+              maxLength: 100,
             },
             colProps: {
               xl: 6,
@@ -226,7 +226,7 @@
             label: '身份证',
             component: 'Input',
             componentProps: {
-              maxLength: 15,
+              maxLength: 18,
             },
             colProps: {
               xl: 6,

+ 13 - 6
src/views/lanUser/setpaswordModal.vue

@@ -8,10 +8,13 @@
     @cancel="resetFields"
   >
     <div class="pt-3px pr-3px">
-      <BasicForm @register="registerForm" />
-      <span style="margin-left: 100px; color: #9f9c9c"
-        >禁用后,该平台无法打开。请为已有用户分配平台</span
-      >
+      <div style="position: relative;">
+        <BasicForm @register="registerForm" />
+      </div>
+      <div style="padding-left: 100px; color: #9f9c9c; padding-bottom: 10px">
+        禁用后,该平台无法打开,平台管理员身份将更改为普通警员一起分配到其他平台。
+      </div>
+      <span style="margin-left: 100px; color: #9f9c9c">注意:禁用后无法恢复,请谨慎操作。</span>
     </div>
   </BasicModal>
 </template>
@@ -80,9 +83,13 @@
           defaultValue: '',
           componentProps: {
             style: 'max-width: 285px',
-            placeholder: '请选择删除之后的员工平台',
+            placeholder: '请选择平台',
+            getPopupContainer: (triggerNode) => {
+              return triggerNode || document.body;
+            },
             api: platformallList,
             labelField: 'platformName',
+            listHeight: 150,
             valueField: 'id',
             params: {
               type: 1,
@@ -117,7 +124,7 @@
           // setProps
         },
       ] = useForm({
-        labelWidth: 120,
+        labelWidth: 100,
         schemas,
         showActionButtonGroup: false,
         actionColOptions: {

+ 7 - 6
src/views/productOperation/cameraScene.vue

@@ -33,14 +33,14 @@
       <template #footer>
         <a-tabs v-model:activeKey="tableType" @change="changeTable">
           <!-- <a-tab-pane :key="0" tab="四维看看" :disabled="loading"/> -->
-          <a-tab-pane :key="1" tab="四维看见" :disabled="loading" />
+          <Tabs.TabPane :key="1" tab="四维看见" :disabled="loading" />
           <!-- <a-tab-pane :key="2" tab="四维深时" :disabled="loading"/>
         <a-tab-pane :key="3" tab="四维双目Lite" :disabled="loading"/> 
         <a-tab-pane :key="4" tab="四维全景" :disabled="loading"/>  -->
-          <a-tab-pane :key="2" tab="深时点云场景" :disabled="loading" />
-          <a-tab-pane :key="5" tab="深时Mesh场景" :disabled="loading" />
-          <a-tab-pane :key="6" tab="深光点云场景" :disabled="loading" />
-          <a-tab-pane :key="7" tab="深光Mesh场景" :disabled="loading" /> </a-tabs
+          <Tabs.TabPane :key="2" tab="深时点云场景" :disabled="loading" />
+          <Tabs.TabPane :key="5" tab="深时Mesh场景" :disabled="loading" />
+          <Tabs.TabPane :key="6" tab="深光点云场景" :disabled="loading" />
+          <Tabs.TabPane :key="7" tab="深光Mesh场景" :disabled="loading" /> </a-tabs
       ></template>
       <div class="desc-wrap-BasicTable">
         <BasicTable @register="registerTable">
@@ -221,7 +221,8 @@ export default defineComponent({
     [Descriptions.Item.name]: Descriptions.Item,
     QrCode,
     Icon,
-    // [Tabs.name]: Tabs,
+    // Tabs,
+    [Tabs.name]: Tabs,
     // [Tabs.TabPane?.name]: Tabs.TabPane,
   },
   setup() {