From 797992cf12451dc64070ec63b6b1917aa5cc9b2e Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 13 四月 2023 16:26:58 +0800
Subject: [PATCH] 目录管理页面修改;数据上传页面修改

---
 src/views/datamanage/catalogueManage.vue |  134 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 124 insertions(+), 10 deletions(-)

diff --git a/src/views/datamanage/catalogueManage.vue b/src/views/datamanage/catalogueManage.vue
index 2c28a0f..b6db35b 100644
--- a/src/views/datamanage/catalogueManage.vue
+++ b/src/views/datamanage/catalogueManage.vue
@@ -173,13 +173,26 @@
             :label="$t('dataManage.dataUpObj.inspectionItems')"
             :label-width="formLabelWidth"
           >
-            <el-input
+            <el-select
+              style="width: 420px"
               v-model="itemdetail.checks"
+              multiple
+            >
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <!-- <el-input
+     
               type="textarea"
               style=" max-width: 420px"
               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')"
               clearable
-            />
+            /> -->
             <!--            resize="none"-->
             <!--            style="height: 100%; overflow: auto; max-width: 400px"-->
           </el-form-item>
@@ -324,12 +337,26 @@
           :label="$t('dataManage.dataUpObj.inspectionItems')"
           :label-width="formLabelWidth"
         >
-          <el-input
-            v-model="ruleForm.checks"
+          <!-- <el-input
+            
             type="textarea"
             resize="none"
-            style="height: 100%; overflow: auto"
-          />
+         
+          /> -->
+          <el-select
+            v-model="ruleForm.checks"
+            multiple
+            style="width:100%;"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+
         </el-form-item>
         <el-form-item
           :label="$t('dataManage.dataUpObj.code')"
@@ -420,7 +447,9 @@
       dirList: [], //el鏍戞暟鎹�
       old_dirDat: [], //el鏍戞暟鎹�(鎷栧姩鍓�)
       newData: [], //鎷栧姩鍚庡師濮嬫暟鎹�
-      itemdetail: {},
+      itemdetail: {
+        checks: [],
+      },
       itemaName: null,
       backUpData: "",
       formLabelWidth: "150px",
@@ -434,6 +463,7 @@
         name: "",
         descr: "",
         bak: "",
+        checks: []
       },
       rules: {
         name: [{ required: true, validator: validName, trigger: "blur" }],
@@ -443,6 +473,52 @@
       fileList: [],
       file: null,
       tableData: [],
+      options: [
+        {
+          value: 'checkMain',
+          label: '鎬昏川妫�'
+        }, {
+          value: 'checkOsgb',
+          label: 'OSGB妫�鏌�'
+        }, {
+          value: 'checkXls',
+          label: '琛ㄦ牸鏁版嵁妫�鏌�'
+        }, {
+          value: 'checkLaz',
+          label: '鐐逛簯妫�鏌�'
+        }, {
+          value: 'checkDem',
+          label: '楂樼▼妫�鏌�'
+        }, {
+          value: 'checkAttrs',
+          label: '灞炴�ф鏌�'
+        }, {
+          value: 'checkTopology',
+          label: '鎷撴墤妫�鏌�'
+        }, {
+          value: 'checkDecorate',
+          label: '鍥鹃潰鏁撮グ妫�鏌�'
+        }, {
+          value: 'checkOrigin',
+          label: '鍘熺偣妫�鏌�'
+        }, {
+          value: 'checkDom',
+          label: '鏍呮牸妫�鏌�'
+        }, {
+          value: 'checkMath',
+          label: '鏁板鍩虹妫�鏌�'
+        }, {
+          value: 'checkMeta',
+          label: '鍏冩暟鎹鏌�'
+        }, {
+          value: 'checkLogical',
+          label: '閫昏緫涓�鑷存�ф鏌�'
+        }, {
+          value: 'checkSingleIntegrity',
+          label: '鍗曢」鎴愭灉瀹屾暣鎬ф鏌�'
+        }
+
+      ],
     };
   },
   methods: {
@@ -786,7 +862,9 @@
         this.$refs[formName].validate((valid) => {
           if (valid) {
             this.fullscreenLoading = true;
-            insertDir(this.ruleForm)
+            var val = this.ruleForm;
+            val.checks = this.ruleForm.checks.toString()
+            insertDir(val)
               .then((res) => {
                 setTimeout(() => {
                   this.fullscreenLoading = false;
@@ -980,14 +1058,35 @@
       }
       this.newNode = node;
       this.backUpData = JSON.stringify(data);
-      this.itemdetail = JSON.parse(JSON.stringify(data));
+      var val = JSON.parse(JSON.stringify(data));
+      this.itemdetail = val;
+      var checks = [];
+      if (val.checks) {
+        if (val.checks.indexOf(',') > -1) {
+          var value = val.checks.split(',');
+          for (var i in value) {
+            checks.push(value[i])
+          }
+        } else {
+          checks.push(val.checks)
+        }
+        this.itemdetail.checks = checks;
+      } else {
+        this.itemdetail.checks = []
+      }
+
     },
     updCata(formName) {
       this.$nextTick(() => {
         this.$refs[formName].validate((valid) => {
           if (valid) {
             this.fullscreenLoading = true;
-            updateDirTree(this.itemdetail)
+
+            var val = this.itemdetail
+            var value = this.itemdetail.checks.toString()
+            val.checks = value;
+
+            updateDirTree(val)
               .then((res) => {
                 setTimeout(() => {
                   this.fullscreenLoading = false;
@@ -1013,6 +1112,21 @@
       // this.$refs[formName].resetFields();
       if (this.backUpData != "") {
         this.itemdetail = JSON.parse(this.backUpData);
+        var val = JSON.parse(this.backUpData);
+        var checks = [];
+        if (val.checks) {
+          if (val.checks.indexOf(',') > -1) {
+            var value = val.checks.split(',');
+            for (var i in value) {
+              checks.push(value[i])
+            }
+          } else {
+            checks.push(val.checks)
+          }
+          this.itemdetail.checks = checks;
+        } else {
+          this.itemdetail.checks = []
+        }
       }
     },
     showPermsMenu(res) {

--
Gitblit v1.9.3