YY 2 yıl önce
ebeveyn
işleme
065a13a0ee

+ 2 - 1
src/components/common/studio/info.vue

@@ -9,7 +9,7 @@
             </span>
           </template>
           <template #team>
-            <data-table :fields="teamfields" :opera="[]" :data="form.team" :usePage="false"> </data-table>
+            <component :is="CTable" :fields="teamfields" :opera="[]" :data="form.team" :usePage="false"> </component>
           </template>
           <template #hz_fields>
             <span v-for="(i, index) in form.hzfieldsList" :key="index" class="direction">
@@ -43,6 +43,7 @@
 </template>
 <script lang="ts" setup>
 import CForm from '@/components/c-form.vue';
+import CTable from '@/components/c-table.vue';
 import { ref, toRefs, watch } from 'vue';
 import store from '@/stores/counter';
 import type { Ref } from 'vue';

+ 1 - 1
src/views/user/scientist/studio/index.vue

@@ -102,7 +102,7 @@ let studioList: Ref<any[]> = ref([]);
 // 工作室查询列表
 let searchStudioList: Ref<any[]> = ref([]);
 onMounted(async () => {
-  user.value = store.state.user;
+  user.value = store.state.user as { _id: string; name: string; unit_name: string; nick_name: string };
   await searchUser();
   await searchOther();
   await search({ skip, limit });

+ 12 - 4
src/views/user/support/add.vue

@@ -77,12 +77,13 @@ let url: Ref<string> = ref('/files/studioadmin/other/upload');
 // 用户信息
 let user: Ref<{ _id: string; name: string; unit_name: string; nick_name: string }> = ref({ _id: '', name: '', unit_name: '', nick_name: '' });
 // 个人用户信息
-let userInfo: Ref<{ name: string; _id: String; user_id: String; status: String; company: String }> = ref({
+let userInfo: Ref<{ name: string; _id: String; user_id: String; status: String; company: String; phone: { phone: String } }> = ref({
   _id: '',
   user_id: '',
   status: '',
   name: '',
   company: '',
+  phone: { phone: '' },
 });
 // 表单
 let form: Ref<{ content: string; file: dataItem[] }> = ref({ content: '', file: [] });
@@ -91,7 +92,7 @@ let fieldList: Ref<any[]> = ref([]);
 // 是否启用
 let isuseList: Ref<any[]> = ref([]);
 onMounted(async () => {
-  user.value = store.state.user;
+  user.value = store.state.user as { _id: string; name: string; unit_name: string; nick_name: string };
   await searchOther();
   await searchUser();
   await search();
@@ -103,12 +104,19 @@ const searchUser = async () => {
 };
 // 查询
 const search = async () => {
-  let data = { user_id: user.value._id, scientist_name: userInfo.value.name, phone: userInfo.value.phone.phone, company_name: userInfo.value.company };
+  let data = {
+    file: [],
+    content: '',
+    user_id: user.value._id,
+    scientist_name: userInfo.value.name,
+    phone: userInfo.value.phone.phone,
+    company_name: userInfo.value.company,
+  };
   if (route.query && route.query.id) {
     let id = route.query.id;
     const res: IQueryResult = await techolsupport.fetch(id);
     if (res.errcode == 0) {
-      if (res.data) form.value = res.data as {};
+      if (res.data) form.value = res.data as { content: string; file: dataItem[] };
     }
   } else {
     form.value = { ...data };

+ 1 - 1
src/views/user/support/index.vue

@@ -106,7 +106,7 @@ let statusList: Ref<any[]> = ref([]);
 let isuseList: Ref<any[]> = ref([]);
 
 onMounted(async () => {
-  user.value = store.state.user;
+  user.value = store.state.user as { _id: string; name: string; unit_name: string; nick_name: string };
   await searchUser();
   await searchOther();
   await search({ skip, limit });

+ 2 - 2
src/views/user/support/info.vue

@@ -6,7 +6,7 @@
           <component :is="partsSearch" :is_back="true" @toBack="toBack()"></component>
         </el-col>
         <el-col :span="24" class="two">
-          <component :is="studioInfo" :info="info"></component>
+          <component :is="supportInfo" :info="info"></component>
         </el-col>
       </el-col>
     </el-row>
@@ -14,7 +14,7 @@
 </template>
 <script setup lang="ts">
 import partsSearch from '@/components/c-search.vue';
-import studioInfo from '@/components/common/studio/info.vue';
+import supportInfo from '@/components/common/support/info.vue';
 import { useRoute } from 'vue-router';
 import type { Ref } from 'vue';
 import { ref, onMounted } from 'vue';