8
0
duy 7 сар өмнө
parent
commit
560b5646fa

+ 6 - 1
src/views/certificate/admin.vue

@@ -33,7 +33,7 @@
 
 <script setup>
 import { nextTick, onActivated, ref } from 'vue'
-import { getArrValue } from 'js-fast-way'
+import { getArrValue, isNullES } from 'js-fast-way'
 import HcAdminSee from './modules/admin/see.vue'
 import mainApi from '~api/certificate/admin'
 
@@ -60,6 +60,11 @@ const searchForm = ref({ projectId: '', current: 1, size: 20, total: 0, certific
 //搜索
 const searchClick = () => {
     searchForm.value.current = 1
+    console.log( searchForm.value, ' searchForm.value')
+    if (isNullES(searchForm.value.projectId)) {
+        searchForm.value.projectId = ''
+    }
+
     getTableData()
 }
 

+ 35 - 34
src/views/project/list/previewPage.vue

@@ -3,9 +3,9 @@
         v-model="isShow"
         :footer="false"
         :title="info.tableName"
-        @close="dialogClose"
         widths="56rem"
-        :isTable="true"
+        :is-table="true"
+        @close="dialogClose"
     >
         <hc-table :column="tableColumn" :datas="tableData">
             <template #eType="{ row }">
@@ -14,68 +14,69 @@
         </hc-table>
     </hc-dialog>
 </template>
+
 <script setup>
-import { ref, watch } from "vue";
-import treeApi from "~api/wbs/tree";
-import { getArrValue } from "js-fast-way";
-import { getDictionaryData, getDictionaryName } from "~src/utils/tools";
+import { ref, watch } from 'vue'
+import treeApi from '~api/wbs/tree'
+import { getArrValue } from 'js-fast-way'
+import { getDictionaryData, getDictionaryName } from '~src/utils/tools'
 
 const props = defineProps({
     info: {
         type: Object,
         default: () => {},
     },
-});
+})
 //事件
-const emit = defineEmits(["close"]);
+const emit = defineEmits(['close'])
 //双向绑定
 // eslint-disable-next-line no-undef
-const isShow = defineModel("modelValue", {
+const isShow = defineModel('modelValue', {
     default: false,
-});
-const tableData = ref([]);
+})
+const tableData = ref([])
 const getTableData = async () => {
     const { data } = await treeApi.selectPrivateFormElements({
         id: info.value?.initTableId,
-    });
-    tableData.value = getArrValue(data);
-};
+    })
+    tableData.value = getArrValue(data)
+}
 //监听显示
 watch(isShow, (val) => {
     if (val) {
-        getTableData();
-        getDataTypelist();
+        getTableData()
+        getDataTypelist()
     }
-});
-const info = ref(props.info);
+})
+const info = ref(props.info)
 watch(
     () => [props.info],
     ([inf]) => {
-        info.value = inf;
+        info.value = inf
     },
-    { deep: true }
-);
+    { deep: true },
+)
 
 //关闭弹窗
 const dialogClose = () => {
-    isShow.value = false;
-    emit("close");
-};
+    isShow.value = false
+    emit('close')
+}
 
 const tableColumn = ref([
-    { key: "eName", name: "字段信息" },
-    { key: "eType", name: "数据类型" },
-    { key: "eLength", name: "长度" },
-    { key: "eAllowDeviation", name: "允许偏差值" },
-    { key: "eInspectionMethod", name: "检查方法和频率" },
-]);
+    { key: 'eName', name: '字段信息' },
+    { key: 'eType', name: '数据类型' },
+    { key: 'eLength', name: '长度' },
+    { key: 'eAllowDeviation', name: '允许偏差值' },
+    { key: 'eInspectionMethod', name: '检查方法和频率' },
+])
 
 //获取数据类型
-const dataTypeList = ref([]);
+const dataTypeList = ref([])
 const getDataTypelist = async () => {
     if (dataTypeList.value.length > 1) {
-        return;
+        return
     }
-    dataTypeList.value = await getDictionaryData("data_type", false);
-};
+    dataTypeList.value = await getDictionaryData('data_type', false)
+}
 </script>

+ 3 - 1
src/views/project/list/wbs-tree.vue

@@ -991,9 +991,11 @@ const tableSortShowClose = () => {
 const previewShow = ref(false)
 const previewInfo = ref({})
 const previewClick = async (row) => {
+    previewInfo.value = row
     await nextTick()
+   
     previewShow.value = true
-    previewInfo.value = row
+  
 }
 
 //创建新的元素表