From 0a1d2fe85a280f5543b9b3241aaf8d8a39a32f8c Mon Sep 17 00:00:00 2001
From: mg <maokecheng@163.com>
Date: 星期四, 27 十月 2022 18:26:40 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_ui

---
 src/views/systemSetting/baseSetting/department/updateUser/index.vue                                |   16 +-
 src/views/operate/fivepack/shop/components/createUser/index.vue                                    |   57 ++++---
 src/views/operate/car/myIndex/create/law/index.vue                                                 |    1 
 src/components/myUpload/index.vue                                                                  |    4 
 src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/evidence/index.vue    |    4 
 src/views/operate/log/index.vue                                                                    |   26 ++-
 src/utils/helper.js                                                                                |   11 +
 src/views/operate/disposal/casepool/pool/createUser/ill/index.vue                                  |    2 
 src/components/detail/index.vue                                                                    |    2 
 src/components/illdetail/index.vue                                                                 |    5 
 src/components/scene/index.vue                                                                     |    2 
 src/views/systemSetting/baseSetting/department/createUser/index.vue                                |   13 +
 src/views/operate/fivepack/shop/components/updateUser/index.vue                                    |  162 ++++++++++++++++------
 src/components/Upload/index.vue                                                                    |    4 
 src/views/systemSetting/baseSetting/user/components/updateUser/index.vue                           |   27 ---
 src/components/filePictrue/index.vue                                                               |   11 +
 src/views/systemSetting/baseSetting/user/components/createUser/index.vue                           |    3 
 src/components/solveProblem/index.vue                                                              |   10 
 src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue |    4 
 src/views/operate/disposal/casepool/escalation/createUser/ill/index.vue                            |    2 
 src/views/operate/disposal/casepool/notDeal/updateUser/uploadResult/components/evidence/index.vue  |    4 
 21 files changed, 226 insertions(+), 144 deletions(-)

diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue
index 656aa7d..ec73e95 100644
--- a/src/components/Upload/index.vue
+++ b/src/components/Upload/index.vue
@@ -27,8 +27,8 @@
             if (rawFile.type !== 'image/png' && rawFile.type !== 'image/svg+xml' && rawFile.type !== 'image/jpg' && rawFile.type !== 'image/jpeg') {
                 this.$message.error('鍥剧墖蹇呴』鏄� jpg/svg/jpeg/png 鏍煎紡!')
                 return false
-            } else if (rawFile.size / 105 / 105 > 2) {
-                this.$message.error('涓婁紶鍥剧墖涓嶈兘瓒呰繃 2MB!')
+            } else if (rawFile.size / 1024  / 1024  > 5) {
+                this.$message.error('涓婁紶鍥剧墖涓嶈兘瓒呰繃 5MB!')
                 return false
             }
             return true
diff --git a/src/components/detail/index.vue b/src/components/detail/index.vue
index 0d2f3bb..33cd86a 100644
--- a/src/components/detail/index.vue
+++ b/src/components/detail/index.vue
@@ -5,7 +5,7 @@
                 <div class="data-item__left">
                     <label class="data-title">
                         闂绫诲瀷:
-                    </label>
+                    </label> 
                     <span class="data-detail">杩濊</span>
                 </div>
                 <div class="data-item__right">
diff --git a/src/components/filePictrue/index.vue b/src/components/filePictrue/index.vue
index 08be854..8260292 100644
--- a/src/components/filePictrue/index.vue
+++ b/src/components/filePictrue/index.vue
@@ -7,7 +7,7 @@
                     <div class="my-demo" v-for="childer in item.url">
                         <img class="img" :src="childer" alt="">
                         <div class="tip">
-                            <!-- <div>銆愬浘鐗囩被鍨嬨�戜笂鎶�</div> -->
+                            <div>銆愬浘鐗囩被鍨嬨�戜笂鎶�</div> 
                             <div>銆愪笂浼犳椂闂淬�憑{ changeTime(item.createTime) }}</div>
                         </div>
                     </div>
@@ -17,7 +17,7 @@
         <div class="file-deal">
             <div class="tell-title">澶勭疆</div>
             <div class="tell-show" v-for="item in imgSource" :key="item.id">
-                <div v-if="item.type == '02'" style="display:flex">
+                <div v-if="item.type == '02'" class="tell-demo">
                     <div class="my-demo" v-for="childer in item.url">
                         <img class="img" :src="childer" alt="">
                         <div class="tip">
@@ -92,13 +92,18 @@
         }
 
         .tell-show {
-            display: flex;
+            .tell-demo {
+                display: flex;
+                flex-wrap: wrap;
+                width: 100%;
+            }
         }
     }
 
     .my-demo {
         position: relative;
         height: 159px;
+        padding: 10px;
     }
 
     .tip {
diff --git a/src/components/illdetail/index.vue b/src/components/illdetail/index.vue
index 85a20ec..fee547e 100644
--- a/src/components/illdetail/index.vue
+++ b/src/components/illdetail/index.vue
@@ -130,6 +130,7 @@
           <MyFilePicture
             v-else-if="activeIndex === 2"
             :filesPictureVo="filesPictureVo"
+            :mycode='mycode'
           ></MyFilePicture>
           <MySovleProblem
             v-else-if="activeIndex === 3"
@@ -197,10 +198,10 @@
   },
   methods: {
     changeComponent(index) {
-      this.activeIndex = index;
+      this.activeIndex = index; 
     },
   },
-  props: ["info"],
+  props: ["info","mycode"],
 };
 </script>
 <style lang="scss" scoped>
diff --git a/src/components/myUpload/index.vue b/src/components/myUpload/index.vue
index 4b7be53..41d202d 100644
--- a/src/components/myUpload/index.vue
+++ b/src/components/myUpload/index.vue
@@ -46,8 +46,8 @@
             if (rawFile.type !== 'image/png' && rawFile.type !== 'image/svg+xml' && rawFile.type !== 'image/jpg' && rawFile.type !== 'image/jpeg') {
                 this.$message.error('鍥剧墖蹇呴』鏄� jpg/svg/jpeg/png 鏍煎紡!')
                 return false
-            } else if (rawFile.size / 105 / 105 > 2) {
-                this.$message.error('涓婁紶鍥剧墖涓嶈兘瓒呰繃 2MB!')
+            } else if (rawFile.size / 1024 / 1024 > 5) {
+                this.$message.error('涓婁紶鍥剧墖涓嶈兘瓒呰繃 5MB!')
                 return false
             }
             return true
diff --git a/src/components/scene/index.vue b/src/components/scene/index.vue
index 791c5c8..fb62be2 100644
--- a/src/components/scene/index.vue
+++ b/src/components/scene/index.vue
@@ -50,7 +50,7 @@
                 <el-form-item label="褰撲簨浜轰俊鎭�:">
                     <el-input disabled v-model="investigation.type"></el-input>
                 </el-form-item>
-                <el-form-item label="鎯呭喌鎻忚堪:">
+                <el-form-item label="澶勭疆缁撴灉:">
                     <el-input disabled v-model="investigation.description"></el-input>
                 </el-form-item>
                 <el-form-item label="鐓х墖闄勪欢:">
diff --git a/src/components/solveProblem/index.vue b/src/components/solveProblem/index.vue
index b997b5e..715b979 100644
--- a/src/components/solveProblem/index.vue
+++ b/src/components/solveProblem/index.vue
@@ -37,9 +37,7 @@
         const { handlePassVo: mylist, baseCase } = this;
         console.log(baseCase, mylist);
         if (mylist) {
-            this.list = mylist.workflowConfigSteps.filter(item => {
-                return item.id !== 2
-            });
+            this.list = mylist.workflowConfigSteps;
         }
         if (baseCase.dispatchInfo) {
             this.dispatchInfo = baseCase.dispatchInfo;
@@ -51,9 +49,11 @@
             const { dispatchInfo } = this;
             if (name === '璋冨害') {
                 return '銆愭淳閬f剰瑙併��' 
-            } else if (name === '鏍告煡') {
+            } else if (name === '澶勭悊') {
+                return '銆愬鐞嗙粨鏋溿��'
+            }else if (name === '鏍告煡') {
                 return '銆愭牳鏌ョ粨鏋溿��'
-            } else if (name === '缁撴') {
+            }  else if (name === '缁撴') {
                 return '銆愯瘎瀹氱粨鏋溿��'
             }
             return
diff --git a/src/utils/helper.js b/src/utils/helper.js
index cc5a8e1..25f8baf 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -78,6 +78,17 @@
     }
     return;
 }
+// 鑾峰彇骞存湀鏃ユ椂鍒嗙
+export function getNowDate(time){
+    const result = new Date(time);
+    let yy = result.getFullYear(),
+    mm = result.getMonth()+1,
+    dd = result.getDate(),
+    hh = result.getHours(),
+    mi = result.getMinutes(),
+    ss = result.getSeconds()
+    return yy+'-'+ fillTime(mm)+'-'+fillTime(dd)+" "+fillTime(hh)+':'+fillTime(mi) + ':' + fillTime(ss);
+}
 function filterTime(time) {
     if (time < 0) {
         return '宸查�炬湡';
diff --git a/src/views/operate/car/myIndex/create/law/index.vue b/src/views/operate/car/myIndex/create/law/index.vue
index 7f0ca0b..f6defdc 100644
--- a/src/views/operate/car/myIndex/create/law/index.vue
+++ b/src/views/operate/car/myIndex/create/law/index.vue
@@ -193,7 +193,6 @@
     // 娣诲姞杞﹁締
     handleCar() {
       this.$refs.user.validate((valid) => {
-          debugger;
         if (valid) {
           const { car } = this;
           this.$axios({
diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue
index e952b39..1781109 100644
--- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue
+++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue
@@ -31,9 +31,9 @@
                     <el-input suffix-icon="el-icon-s-order" v-model="evidence.userInfo" @focus="openDialog"></el-input>
                 </el-form-item>
                 <!-- 鎯呭喌鎻忚堪 -->
-                <el-form-item label="鎯呭喌鎻忚堪:" prop="description">
+                <el-form-item label="澶勭疆缁撴灉:" prop="description">
                     <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" show-word-limit
-                        v-model="evidence.description" placeholder="璇疯緭鍏ユ儏鍐垫弿杩�,闄愬埗200瀛椾互鍐�"></el-input>
+                        v-model="evidence.description" placeholder="璇疯緭鍏ュ缃粨鏋�,闄愬埗200瀛椾互鍐�"></el-input>
                 </el-form-item>
                 <!-- 鐓х墖闄勪欢 -->
                 <el-form-item label="鐓х墖闄勪欢:" prop="pic">
diff --git a/src/views/operate/disposal/casepool/escalation/createUser/ill/index.vue b/src/views/operate/disposal/casepool/escalation/createUser/ill/index.vue
index 01dbc8f..7cc5f93 100644
--- a/src/views/operate/disposal/casepool/escalation/createUser/ill/index.vue
+++ b/src/views/operate/disposal/casepool/escalation/createUser/ill/index.vue
@@ -48,7 +48,7 @@
                         </el-select>
                     </el-form-item>
                     <!-- 韬唤璇佹鍙嶉潰鐓х墖 -->
-                    <el-form-item class="optionItems" label="韬唤璇佹鍙嶉潰鐓х墖:" prop="positive">
+                    <el-form-item class="optionItems" label="韬唤璇佹銆佸弽闈㈢収鐗�:" prop="positive">
                         <template>
                             <div class="idcard">
                                 <el-upload class="upload-demo" :show-file-list="false"
diff --git a/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/evidence/index.vue b/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/evidence/index.vue
index ccf64a1..dba41f9 100644
--- a/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/evidence/index.vue
+++ b/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/evidence/index.vue
@@ -29,9 +29,9 @@
                     <el-input suffix-icon="el-icon-s-order" @focus="openDialog"></el-input>
                 </el-form-item>
                 <!-- 鎯呭喌鎻忚堪 -->
-                <el-form-item label="鎯呭喌鎻忚堪:" prop="description">
+                <el-form-item label="澶勭疆缁撴灉:" prop="description">
                     <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" show-word-limit
-                        v-model="evidence.description" placeholder="璇疯緭鍏ユ儏鍐垫弿杩�,闄愬埗200瀛椾互鍐�"></el-input>
+                        v-model="evidence.description" placeholder="璇疯緭鍏ュ缃粨鏋�,闄愬埗200瀛椾互鍐�"></el-input>
                 </el-form-item>
                 <!-- 鐓х墖闄勪欢 -->
                 <el-form-item label="鐓х墖闄勪欢:" prop="photo">
diff --git a/src/views/operate/disposal/casepool/notDeal/updateUser/uploadResult/components/evidence/index.vue b/src/views/operate/disposal/casepool/notDeal/updateUser/uploadResult/components/evidence/index.vue
index ccf64a1..dba41f9 100644
--- a/src/views/operate/disposal/casepool/notDeal/updateUser/uploadResult/components/evidence/index.vue
+++ b/src/views/operate/disposal/casepool/notDeal/updateUser/uploadResult/components/evidence/index.vue
@@ -29,9 +29,9 @@
                     <el-input suffix-icon="el-icon-s-order" @focus="openDialog"></el-input>
                 </el-form-item>
                 <!-- 鎯呭喌鎻忚堪 -->
-                <el-form-item label="鎯呭喌鎻忚堪:" prop="description">
+                <el-form-item label="澶勭疆缁撴灉:" prop="description">
                     <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="200" show-word-limit
-                        v-model="evidence.description" placeholder="璇疯緭鍏ユ儏鍐垫弿杩�,闄愬埗200瀛椾互鍐�"></el-input>
+                        v-model="evidence.description" placeholder="璇疯緭鍏ュ缃粨鏋�,闄愬埗200瀛椾互鍐�"></el-input>
                 </el-form-item>
                 <!-- 鐓х墖闄勪欢 -->
                 <el-form-item label="鐓х墖闄勪欢:" prop="photo">
diff --git a/src/views/operate/disposal/casepool/pool/createUser/ill/index.vue b/src/views/operate/disposal/casepool/pool/createUser/ill/index.vue
index cc4d427..78e13a9 100644
--- a/src/views/operate/disposal/casepool/pool/createUser/ill/index.vue
+++ b/src/views/operate/disposal/casepool/pool/createUser/ill/index.vue
@@ -63,7 +63,7 @@
                         </el-form-item>
                     </div>
                     <!-- 韬唤璇佹鍙嶉潰鐓х墖 -->
-                    <el-form-item class="optionItems" label="韬唤璇佹鍙嶉潰鐓х墖:" prop="positive">
+                    <el-form-item class="optionItems" label="韬唤璇佹銆佸弽闈㈢収鐗�:" prop="positive">
                         <template>
                             <div class="idcard">
                                 <el-upload class="upload-demo" :show-file-list="false"
diff --git a/src/views/operate/fivepack/shop/components/createUser/index.vue b/src/views/operate/fivepack/shop/components/createUser/index.vue
index 0e5b88d..6a17d2b 100644
--- a/src/views/operate/fivepack/shop/components/createUser/index.vue
+++ b/src/views/operate/fivepack/shop/components/createUser/index.vue
@@ -5,8 +5,8 @@
                 <el-form ref="user" label-width="140px" autoComplete="on" :model="store" :rules="createUserRules"
                     label-position="right">
                     <!-- 搴楅摵绫诲瀷 -->
-                    <el-form-item class="optionItem" label="搴楅摵绫诲瀷:" prop="storetype">
-                        <el-select v-model="store.storetype" placeholder="璇烽�夋嫨搴楅摵绫诲瀷">
+                    <el-form-item class="optionItem" label="搴楅摵绫诲瀷:" prop="type">
+                        <el-select v-model="store.type" placeholder="璇烽�夋嫨搴楅摵绫诲瀷">
                             <el-option value="1">
                                 <el-tree ref="tree" :check-strictly="true" :data="shopTypeList" :props="defaultProps"
                                     show-checkbox @check-change="handleCheck" default-expand-all node-key="id">
@@ -23,9 +23,9 @@
                         <el-input v-model="store.owner" placeholder="璇峰~鍐欏簵閾鸿礋璐d汉鍚嶅瓧"></el-input>
                     </el-form-item>
                     <!-- 搴楅摵鎻忚堪 -->
-                    <el-form-item class="optionItem" label="搴楅摵鎻忚堪:" prop="storedesc">
-                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="300" show-word-limit
-                            v-model="store.storedesc" placeholder="杈撳叆搴楅摵鎻忚堪"></el-input>
+                    <el-form-item class="optionItem" label="搴楅摵鎻忚堪:" prop="description">
+                        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8 }" maxlength="300" show-word-limit
+                            v-model="store.description" placeholder="杈撳叆搴楅摵鎻忚堪"></el-input>
                         <!-- <el-input type="textarea" v-model="user.storedesc" placeholder="杈撳叆閮ㄩ棬鎻忚堪"></el-input> -->
                     </el-form-item>
                     <!-- 鑱旂郴鏂瑰紡 -->
@@ -58,9 +58,9 @@
                 callback();
             }
         };
-        const validatePass = (rule, value, callback) => {
+        const validateShopName = (rule, value, callback) => {
             if (!value) {
-                callback();
+                callback(new Error('搴楅摵鍚嶇О涓嶈兘涓虹┖'));
             } else {
                 callback();
             }
@@ -84,14 +84,15 @@
                 }
             }
         };
-        const validateMail = (rule, value, callback) => {
-            if (value) {
-                callback();
-            } else {
-                callback(new Error('搴楅摵鍚嶇О涓嶈兘涓虹┖'))
-            }
-        };
+        // const validateMail = (rule, value, callback) => {
+        //     if (value) {
+        //         callback();
+        //     } else {
+        //         callback(new Error('搴楅摵鍚嶇О涓嶈兘涓虹┖'))
+        //     }
+        // };
         const validateType = (rule, value, callback) => {
+            console.log(value)
             if (!value) {
                 callback(new Error('闂ㄥ簵绫诲瀷涓嶈兘涓虹┖'));
             } else {
@@ -113,38 +114,38 @@
                 storeaddr: '',
                 storename: '',
                 storedesc: '',
-                storetype: '',
+                type: '',
             },
             createUserRules: {
                 owner: [
                     { required: true, trigger: "blur", validator: validateNickname },
                 ],
-                storetype: [
+                type: [
                     {
                         required: true, trigger: 'change', validator: validateType,
                     }
                 ],
-                idcardinfo: [
-                    { required: true, trigger: "blur", validator: validatePass },
-                ],
+                // idcardinfo: [
+                //     { required: true, trigger: "blur", validator: validatePass },
+                // ],
                 storeaddr: [
                     { required: true, trigger: "blur", validator: validateTruename },
                 ],
                 contact: [
                     { required: true, trigger: "blur", validator: validatePhone },
                 ],
-                storename: [
-                    { required: true, trigger: "blur", validator: validateMail },
-                ],
-                storedesc: [
+                description: [
                     { required: false, trigger: "blur", validator: validateDesc },
                 ],
+                storename: [
+                    { required: true, trigger: "blur", validator: validateShopName },
+                ]
             },
             shopTypeList: [
                 { name: '绫诲瀷1', value: 1 }, { name: '绫诲瀷2', value: 2 }
             ],
             defaultProps: {
-                children: 'children', 
+                children: 'children',
                 label: 'name',
                 disabled: (data, node) => {
                     if (node.level === 1 && node.childNodes.length !== 0) {
@@ -162,7 +163,7 @@
     },
     methods: {
         handleStore() {
-            const { store } = this;
+            const { store,selectOrg } = this;
             this.$refs.user.validate((valid) => {
                 console.log(valid);
                 if (valid) {
@@ -171,10 +172,11 @@
                         url: 'sccg/store/storeinfo/add',
                         data: {
                             contact: store.contact,
-                            idcardinfo: '511025184612310215',
                             owner: store.owner,
                             storeaddr: store.storeaddr,
                             storename: store.storename,
+                            description: store.description,
+                            type: selectOrg.orgsid[0],
                         }
                     })
                         .then(res => {
@@ -226,7 +228,8 @@
             }
         },
         handleCheck(data, checked) {
-            this.store.storetype = data.name;
+            console.log(data)
+            this.store.type = data.name;
             // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
             const indexs = this.selectOrg.orgsid.indexOf(data.id)
             // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
diff --git a/src/views/operate/fivepack/shop/components/updateUser/index.vue b/src/views/operate/fivepack/shop/components/updateUser/index.vue
index 5bfb804..cd071e1 100644
--- a/src/views/operate/fivepack/shop/components/updateUser/index.vue
+++ b/src/views/operate/fivepack/shop/components/updateUser/index.vue
@@ -1,13 +1,16 @@
 <template>
-    <div class="createUser">
+    <div class="createUser" v-if="showFlag">
         <main>
             <div class="mainContent">
                 <el-form ref="user" label-width="140px" autoComplete="on" :model="store" :rules="createUserRules"
                     label-position="right">
                     <!-- 搴楅摵绫诲瀷 -->
-                    <el-form-item class="optionItem" label="搴楅摵绫诲瀷:" prop="storetype">
-                        <el-select v-model="store.storetype" placeholder="搴楅摵/闂ㄥ簵绫诲瀷">
-                            <el-option v-for="item in shopTypeList" :key="item.name" :label="item.name" :value="item.value">
+                    <el-form-item class="optionItem" label="搴楅摵绫诲瀷:" prop="type">
+                        <el-select v-model="store.type" placeholder="璇烽�夋嫨搴楅摵绫诲瀷">
+                            <el-option value="1">
+                                <el-tree ref="tree" :check-strictly="true" :data="shopTypeList" :props="defaultProps"
+                                    show-checkbox @check-change="handleCheck" :default-checked-keys="[selectOrg.orgsid[0]]" default-expand-all node-key="id">
+                                </el-tree>
                             </el-option>
                         </el-select>
                     </el-form-item>
@@ -21,7 +24,7 @@
                     </el-form-item>
                     <!-- 搴楅摵鎻忚堪 -->
                     <el-form-item class="optionItem" label="搴楅摵鎻忚堪:" prop="storeDesc">
-                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="300" show-word-limit
+                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="300" show-word-limit
                             v-model="store.storeDesc" placeholder="杈撳叆搴楅摵鎻忚堪"></el-input>
                         <!-- <el-input type="textarea" v-model="user.storedesc" placeholder="杈撳叆閮ㄩ棬鎻忚堪"></el-input> -->
                     </el-form-item>
@@ -45,6 +48,7 @@
     </div>
 </template>
 <script>
+import { getCodeList } from '@/utils/helper'
 export default {
     data() {
         const validateNickname = (rule, value, callback) => {
@@ -75,7 +79,7 @@
                 const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                 if (!rep.test(value)) {
                     callback("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜");
-                }else{
+                } else {
                     callback();
                 }
             }
@@ -90,7 +94,7 @@
         const validateType = (rule, value, callback) => {
             if (!value) {
                 callback(new Error('闂ㄥ簵绫诲瀷涓嶈兘涓虹┖'));
-            } else { 
+            } else {
                 callback();
             }
         };
@@ -108,9 +112,9 @@
                 owner: [
                     { required: true, trigger: "blur", validator: validateNickname },
                 ],
-                storetype:[
+                storetype: [
                     {
-                        required:true,trigger:'change', validator:validateType,
+                        required: true, trigger: 'change', validator: validateType,
                     }
                 ],
                 idcardinfo: [
@@ -130,60 +134,130 @@
                 ],
             },
             shopTypeList: [
-                { name: '绫诲瀷1', value: 1 }, { name: '绫诲瀷2', value: 2 }
+
             ],
+            defaultProps: {
+                children: 'children',
+                label: 'name',
+            },
+            selectOrg: {
+                orgsid: []
+            },
+            showFlag:false
         }
     },
     created() {
-        const {userInfo} = this;
-        console.log(userInfo)
+        const { userInfo } = this;
+        // console.log(userInfo)
         this.store = userInfo
+        this.getShopTypeList();
+        // console.log(this.store)
     },
     methods: {
+        // 鑾峰彇瀛楀吀
+        async getShopTypeList() {
+            let arr = await getCodeList('16');
+            this.selectOrg.orgsid[0] = this.store.type
+            console.log(this.selectOrg.orgsid)
+            arr.forEach(item=>{
+                item.id === this.store.type ? this.store.type = item.name : '鏆傛棤鍒嗙被'
+            })
+            this.showFlag = true
+            this.shopTypeList = this.createShopTypeTree(arr);
+        },
+        createShopTypeTree(arr) {
+            if (arr.length && arr.length !== 0) {
+                // 鑾峰彇椤剁骇鑿滃崟
+                let treeRoot = arr.filter(item => {
+                    return item.parentId === 0
+                })
+                console.log(treeRoot);
+                // 娣诲姞child
+                treeRoot.forEach(item => {
+                    item.children = []
+                    arr.forEach(child => {
+                        if (child.parentId === item.id) {
+                            item.children.push(child)
+                        }
+                    })
+                })
+                return treeRoot;
+            }
+        },
+        handleCheck(data, checked) {
+            // console.log(data)
+            this.store.type = data.name;
+            // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
+            const indexs = this.selectOrg.orgsid.indexOf(data.id)
+            // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
+            if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
+                this.$message({
+                    message: '鍙兘閫夋嫨涓�涓儴闂紒',
+                    type: 'warning',
+                    showClose: true
+                })
+                // 璁剧疆宸查�夋嫨鐨勮妭鐐逛负false 寰堥噸瑕�
+                this.$refs.tree.setChecked(data, false)
+            } else if (this.selectOrg.orgsid.length === 0 && checked) {
+                // 鍙戠幇鏁扮粍涓虹┖ 骞朵笖鏄凡閫夋嫨
+                // 闃叉鏁扮粍鏈夊�硷紝棣栧厛娓呯┖锛屽啀push
+                this.selectOrg.orgsid = []
+                this.selectOrg.orgsid.push(data.id)
+            } else if (
+                indexs >= 0 &&
+                this.selectOrg.orgsid.length === 1 &&
+                !checked
+            ) {
+                // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣�
+                this.selectOrg.orgsid = []
+                this.store.storetype = ''
+            }
+        },
         handleUser() {
             const { store } = this;
-            this.$refs.user.validate((valid)=>{
+            this.$refs.user.validate((valid) => {
                 console.log(valid);
-                if(valid){
+                if (valid) {
                     this.$axios({
-                        method:'put',
-                        url:'sccg/store/storeinfo/update',
-                        data:{
-                            contact:store.contact,
-                            idcardinfo:store.idCardInfo,
-                            owner:store.owner,
-                            storeAddress:store.storeAddress,
-                            storeName:store.storeName,
-                            id:store.id,
-                            storePhoto:store.storePhoto,
-                            storeScore:store.storeScore,
+                        method: 'put',
+                        url: 'sccg/store/storeinfo/update',
+                        data: {
+                            contact: store.contact,
+                            idcardinfo: store.idCardInfo,
+                            owner: store.owner,
+                            storeAddress: store.storeAddress,
+                            storeName: store.storeName,
+                            id: store.id,
+                            storePhoto: store.storePhoto,
+                            storeScore: store.storeScore,
+                            type:this.selectOrg.orgsid[0]
                         }
                     })
-                    .then(res=>{
-                        console.log(res);
-                        if(res.code===200){
-                            this.$message({
-                                type:'success',
-                                message:'淇敼鎴愬姛',
-                            })
-                            this.$emit('changeDialog',{flag:false});
-                        }else{
-                            this.$message({
-                                type:'error',
-                                message:res.message,
-                            })
-                        }
-                    })
-                }else{
+                        .then(res => {
+                            console.log(res);
+                            if (res.code === 200) {
+                                this.$message({
+                                    type: 'success',
+                                    message: '淇敼鎴愬姛',
+                                })
+                                this.$emit('changeDialog', { flag: false });
+                            } else {
+                                this.$message({
+                                    type: 'error',
+                                    message: res.message,
+                                })
+                            }
+                        })
+                } else {
                     return false;
                 }
             })
         },
-        handleBack(){
-            this.$emit('changeDialog',{flag:false})
+        handleBack() {
+            this.$emit('changeDialog', { flag: false })
         }
     },
-    props: ['userInfo','changeDialog']
+    props: ['userInfo', 'changeDialog']
 }
 </script>
 <style lang="scss" scoped>
diff --git a/src/views/operate/log/index.vue b/src/views/operate/log/index.vue
index 2b7370d..1e2d8fc 100644
--- a/src/views/operate/log/index.vue
+++ b/src/views/operate/log/index.vue
@@ -63,7 +63,6 @@
         <!-- 鏁版嵁灞曠ず -->
         <el-table
           ref="multipleTable"
-          :default-sort="{ prop: 'createTime' }"
           :header-cell-style="{
             background: '#06122c',
             'font-size': '12px',
@@ -80,9 +79,10 @@
           <el-table-column type="selection" min-width="5"> </el-table-column>
           <el-table-column
             prop="createTime"
-            sortable
             label="鏃ュ織鏃堕棿"
             min-width="10"
+            :sort-orders="['descending','ascending']"
+            sortable="custom"
           >
             <template slot-scope="scope">
               <span>{{ changeTime(scope.row.createTime) }}</span>
@@ -147,6 +147,7 @@
   </div>
 </template>
 <script>
+import {getNowDate} from '@/utils/helper'
 import helper from "@/utils/mydate";
 import { parseTime } from "@/utils/index";
 import { createNamespacedHelpers } from "vuex";
@@ -170,7 +171,7 @@
           label: "鎵归噺鍒犻櫎",
         },
       ],
-      mysort: 0,
+      mysort: 1,
       tempList: [],
       operationType: "鍏ㄩ儴",
       operationTypeList: [],
@@ -198,17 +199,21 @@
     },
     // 瀵煎嚭鏃ュ織
     async handleExport() {
-      const { currentPage, pageSize, context, operationType } = this;
+      const { currentPage, pageSize, context, operationType, mysort, mytime } =
+        this;
+      console.log(mytime);
       let arr = await this.exportLogs({
         content: context,
         current: currentPage,
+        endTime: mytime[1] !== "" ? parseTime(mytime[1]) : "",
+        id: "",
+        operationType: operationType === "鍏ㄩ儴" ? "" : operationType,
+        portEquipment: "",
         size: pageSize,
+        startTime: mytime[0] !== "" ? parseTime(mytime[0]) : "",
+        sort: mysort,
       });
-      let fileName = arr.headers["content-disposition"];
-      console.log(fileName);
-      if (fileName) {
-        fileName = fileName.slice(fileName.indexOf("filename=") + 9);
-      }
+      let fileName = getNowDate(new Date());
       const blob = new Blob([arr.data], {
         type: "application/octet-stream",
       });
@@ -218,7 +223,7 @@
       const href = window.URL.createObjectURL(blob);
       downloadElement.href = href;
       // // 涓嬭浇鍚庢枃浠跺悕
-      downloadElement.download = fileName;
+      downloadElement.download = fileName + '鏃ュ織鏁版嵁.xlsx';
       document.body.appendChild(downloadElement);
       // 鐐瑰嚮涓嬭浇
       downloadElement.click();
@@ -226,6 +231,7 @@
       document.body.removeChild(downloadElement);
       // 閲婃斁鎺塨lob瀵硅薄
       window.URL.revokeObjectURL(href);
+      this.setTableData();
     },
     // 璁剧疆鎿嶄綔绫诲瀷
     async setOperationType() {
diff --git a/src/views/systemSetting/baseSetting/department/createUser/index.vue b/src/views/systemSetting/baseSetting/department/createUser/index.vue
index 321ffee..3efa87b 100644
--- a/src/views/systemSetting/baseSetting/department/createUser/index.vue
+++ b/src/views/systemSetting/baseSetting/department/createUser/index.vue
@@ -88,7 +88,7 @@
                       :label="user.id"
                       :key="user.id"
                     >
-                      {{ user.username }}
+                      {{ user.username}}
                     </el-checkbox>
                   </el-checkbox-group>
                 </div>
@@ -246,9 +246,9 @@
     // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
     getUserList() {
       // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�佺敤鎴锋煡璇�(鏆傛椂鏀寔鐢佃瘽鍙风爜)
-      this.$axios.get(`sccg/admin/list`).then((res) => {
+      this.$axios.get(`/sccg/depart/query_surplus_user`).then((res) => {
         if (res.code === 200) {
-          this.userList = res.data.records;
+          this.userList = res.data;
         }
       });
     },
@@ -402,7 +402,8 @@
         right: 0;
 
         .box-card {
-          max-height: 200px;
+          min-height: 240px;
+          max-height: 260px;
           overflow: hidden;
           background-color: #09152f;
           position: relative;
@@ -410,7 +411,7 @@
 
           .scrollWrap {
             overflow: scroll;
-            height: 160px;
+            height: 180px;
             position: relative;
             color: #4b9bb7;
 
@@ -437,7 +438,7 @@
             top: 77px;
             right: 20px;
             width: 20px;
-            height: 160px;
+            height: 180px;
             background-color: #09152f;
           }
 
diff --git a/src/views/systemSetting/baseSetting/department/updateUser/index.vue b/src/views/systemSetting/baseSetting/department/updateUser/index.vue
index 05735a8..b3e2481 100644
--- a/src/views/systemSetting/baseSetting/department/updateUser/index.vue
+++ b/src/views/systemSetting/baseSetting/department/updateUser/index.vue
@@ -129,13 +129,14 @@
     this.checkedList.forEach((e) => {
       this.checkedUser.push(e.userId);
     });
+    console.log(this.checkedUser)
     this.$axios({
       method: "get",
       url: "sccg/depart/tree",
     }).then((res) => {
       that.departList = res.data;
     });
-    this.getUserList();
+    this.getUserList(this.user.id);
     // 鑾峰彇閮ㄩ棬绫诲瀷
     this.getDepartType();
   },
@@ -191,11 +192,11 @@
     },
 
     // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
-    getUserList() {
+    getUserList(id) {
       // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�佺敤鎴锋煡璇�(鏆傛椂鏀寔鐢佃瘽鍙风爜)
-      this.$axios.get(`sccg/admin/list`).then((res) => {
+      this.$axios.get(`/sccg/depart/query_surplus_exist_user?id=`+id).then((res) => {
         if (res.code === 200) {
-          this.userList = res.data.records;
+          this.userList = res.data;
         }
       });
     },
@@ -322,7 +323,8 @@
   right: 0;
 
   .box-card {
-    max-height: 200px;
+    min-height: 240px;
+    max-height: 260px;
     overflow: hidden;
     background-color: #09152f;
     position: relative;
@@ -330,7 +332,7 @@
 
     .scrollWrap {
       overflow: scroll;
-      height: 160px;
+      height: 180px;
       position: relative;
       color: #4b9bb7;
 
@@ -357,7 +359,7 @@
       top: 77px;
       right: 20px;
       width: 20px;
-      height: 160px;
+      height: 180px;
       background-color: #09152f;
     }
 
diff --git a/src/views/systemSetting/baseSetting/user/components/createUser/index.vue b/src/views/systemSetting/baseSetting/user/components/createUser/index.vue
index 0d2574d..274dda7 100644
--- a/src/views/systemSetting/baseSetting/user/components/createUser/index.vue
+++ b/src/views/systemSetting/baseSetting/user/components/createUser/index.vue
@@ -385,9 +385,10 @@
                         // nickName: user.nickName,
                         sex: `${user.sex}`,
                         password: user.password,
-                        userType: `${user.userType}`,
+                        userType: user.userType,
                         username: user.username,
                         zj: user.zjarea + `${user.zjnumber}` + user.zjother,
+                        nickName: user.nickName
                         // departName:user.departName,
                     }).then(res => {
                         if (res.code === 200) {
diff --git a/src/views/systemSetting/baseSetting/user/components/updateUser/index.vue b/src/views/systemSetting/baseSetting/user/components/updateUser/index.vue
index 86f30f7..cbd53a4 100644
--- a/src/views/systemSetting/baseSetting/user/components/updateUser/index.vue
+++ b/src/views/systemSetting/baseSetting/user/components/updateUser/index.vue
@@ -83,6 +83,7 @@
         // 淇敼鐢ㄦ埛淇℃伅
         handleUser() {
             const { flag, user, tempName, selectOrg, tempRole, isArraySame } = this;
+            let umsDepartManage={userId:user.id,departId:selectOrg.orgsid[0]}
             this.$refs.user.validate((valid) => {
                 if (valid) {
                     user.isDy = `${user.isDy}`;
@@ -95,30 +96,8 @@
                         } else {
                             if (user.departName) {
                                 this.$axios({
-                                    method: 'post',
-                                    url: `sccg/admin/update/${user.id}`,
-                                    data: {
-                                        "id": user.id,
-                                        "username": user.username,
-                                        "password": user.password,
-                                        "icon": user.icon,
-                                        "email": user.email,
-                                        "nickName": user.nickName,
-                                        "note": user.note,
-                                        "createTime": user.createTime,
-                                        "loginTime": user.loginTime,
-                                        "status": user.status ? 1 : 0,
-                                        "macAddress": user.macAddress,
-                                        "ipAddress": user.ipAddress,
-                                        "isDy": `${user.isDy}`,
-                                        "sex": `${user.sex}`,
-                                        "jobTitle": user.jobTitle,
-                                        "departmentId": selectOrg.orgsid[0],
-                                        "departName": user.departName,
-                                        "userType": user.userType,
-                                        "zj": user.zj,
-                                        "mobile": user.mobile,
-                                    }
+                                    method: 'put',
+                                    url: `/sccg/depart/user_update_depart?userId=`+user.id+'&departId='+selectOrg.orgsid[0]
                                 })
                                     .then(res => {
                                         this.$message({

--
Gitblit v1.8.0