achao 2 år sedan
förälder
incheckning
070b961b75

+ 5 - 5
unimall-admin/config/dev.env.js

@@ -1,6 +1,6 @@
 module.exports = {
-	NODE_ENV: '"development"',
-  ENV_CONFIG: '"dev"',
-    HOST: '"http://localhost:8181"',
-    BASE_API: '"http://localhost:8181/m.api"'
-}
+    NODE_ENV: '"development"',
+    ENV_CONFIG: '"dev"',
+    HOST: '"http://192.168.110.82:8181"',
+    BASE_API: '"http://192.168.110.82:8181/m.api"'
+}

+ 294 - 299
unimall-admin/src/views/gubi/info/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width: 100%; display: flex">
+  <div v-loading="loading" style="width: 100%; display: flex">
     <div class="right-info-box">
       <div class="warp_group">
         <div class="line_box">
@@ -22,18 +22,18 @@
                 <span>操作</span>
               </div>
               <el-scrollbar style="height: 572px">
-                <div v-loading="loading" class="item_attr" @click="tabClass('1',index)"  :class="{avtive:num === index}" v-for="(item,index) in first" :key="index">
+                <div v-loading="loading" v-for="(item,index) in first" :class="{avtive:num === index}" :key="index" class="item_attr" @click="tabClass('1',index)">
                   <div class="item_name_box">
                     <!-- <img
                       class="img"
                       :src="item.picture"
                       alt=""
                     /> -->
-                    <span class="item_name_title">{{item.postion}}</span>
-                    <span class="item_name_title">{{item.typeName}}</span>
+                    <span class="item_name_title">{{ item.postion }}</span>
+                    <span class="item_name_title">{{ item.typeName }}</span>
                   </div>
                   <div class="item_sort">
-                    {{item.weight}}
+                    {{ item.weight }}
                     <el-popover trigger="click">
                       <div class="sort_box">
                         <el-input v-model.number="sort" size="small" />
@@ -84,18 +84,18 @@
                 <span>操作</span>
               </div>
               <el-scrollbar style="height: 572px">
-                <div v-loading="loading" class="item_attr" :class="{avtive:sum === index}" @click="tabClass('2',index)" v-for="(item,index) in second" :key="index">
-                  <span class="item_name_title">{{item.postion}}</span>
+                <div v-loading="loading" v-for="(item,index) in second" :class="{avtive:sum === index}" :key="index" class="item_attr" @click="tabClass('2',index)">
+                  <span class="item_name_title">{{ item.postion }}</span>
                   <div class="item_name_box">
                     <img
-                      class="img"
                       :src="item.urlPath.split(',')"
+                      class="img"
                       alt=""
-                    />
-                    <span class="item_name_title">{{item.typeName}}</span>
+                    >
+                    <span class="item_name_title">{{ item.typeName }}</span>
                   </div>
                   <div class="item_sort">
-                    {{item.weight}}
+                    {{ item.weight }}
                     <el-popover trigger="click">
                       <div class="sort_box">
                         <el-input v-model.number="sort" size="small" />
@@ -107,14 +107,14 @@
                     </el-popover>
                   </div>
                   <div class="item_handle">
-                    <el-popover placement="top-start" width="50"  content="编辑">
+                    <el-popover placement="top-start" width="50" content="编辑">
                       <span slot="reference" class="handel_icon">
                         <i class="el-icon-edit" @click="handleUpdate2(item)"/>
                       </span>
                     </el-popover>
                     <el-popover placement="top-start" width="50" content="删除">
                       <span slot="reference" class="handel_icon">
-                        <i class="el-icon-delete"  @click.stop="handleDelete2(item)"/>
+                        <i class="el-icon-delete" @click.stop="handleDelete2(item)"/>
                       </span>
                     </el-popover>
                   </div>
@@ -141,13 +141,13 @@
                 <span>操作</span>
               </div>
               <el-scrollbar style="height: 572px">
-                <div v-loading="loading" class="item_attr" v-for="(item,index) in tertiary" :key="index">
+                <div v-loading="loading" v-for="(item,index) in tertiary" :key="index" class="item_attr">
                   <div class="item_name_box">
-                    <span class="item_name_title" style="margin-right:20px">{{item.postion}}</span>
-                    <span class="item_name_title">{{item.typeName}}</span>
+                    <span class="item_name_title" style="margin-right:20px">{{ item.postion }}</span>
+                    <span class="item_name_title">{{ item.typeName }}</span>
                   </div>
                   <div class="item_sort">
-                    {{item.weight}}
+                    {{ item.weight }}
                     <el-popover trigger="click">
                       <div class="sort_box">
                         <el-input v-model.number="sort" size="small" />
@@ -161,12 +161,12 @@
                   <div class="item_handle">
                     <el-popover placement="top-start" width="50" content="编辑">
                       <span slot="reference" class="handel_icon">
-                        <i class="el-icon-edit"  @click="handleUpdate3(item)"/>
+                        <i class="el-icon-edit" @click="handleUpdate3(item)"/>
                       </span>
                     </el-popover>
                     <el-popover placement="top-start" width="50" content="删除">
                       <span slot="reference" class="handel_icon">
-                        <i class="el-icon-delete"  @click.stop="handleDelete3(item)"/>
+                        <i class="el-icon-delete" @click.stop="handleDelete3(item)"/>
                       </span>
                     </el-popover>
                   </div>
@@ -236,7 +236,7 @@
             <el-option v-for="(item,index) in infoList" :key="index" :label="item.typeName" :value="item.id" />
           </el-select>
         </el-form-item> -->
-        
+
         <el-form-item label="分类名称" prop="secondName">
           <el-input v-model="form2.secondName" placeholder="请输入二级分类" />
         </el-form-item>
@@ -266,7 +266,7 @@
           >
             <i class="el-icon-plus" />
           </el-upload>
-        </el-form-item> 
+        </el-form-item>
         <!-- <el-form-item label="0:否" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
         </el-form-item> -->
@@ -319,44 +319,44 @@
 <script>
 import { uploadPath } from '@/api/storage'
 import { getToken } from '@/utils/auth'
-import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/gubi/info";
-import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from "@/api/gubi/second";
-import { listThree, getThree, delThree, addThree, updateThree, exportThree } from "@/api/gubi/three";
-import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from "@/api/gubi/transaction";
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from '@/api/gubi/info'
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
+import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
+import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
 export default {
   data() {
     return {
-      selectOneType:{},
-      selectTwoType:{},
+      selectOneType: {},
+      selectTwoType: {},
       uploadPath,
       form: {},
       form2: {},
       form3: {},
-      search: "", //搜索分类
-      restaurants: [], //搜索列表
-      superList:[], //搜索列表
-      arrList:[], //搜索列表
-      searchChoose:null, //搜索框搜索对象
-      sort: "", //修改排序
+      search: '', // 搜索分类
+      restaurants: [], // 搜索列表
+      superList: [], // 搜索列表
+      arrList: [], // 搜索列表
+      searchChoose: null, // 搜索框搜索对象
+      sort: '', // 修改排序
       // first:[],
-      first: [], //一级分类列表
-      second:[], //二级分类列表
-      tertiary:[], //三级分类列表
-      num:0, //二级分类
-      sum:0, //三级分类
-      loading:false,
-         // 弹出层标题
-         title: "",
-        // 是否显示弹出层
-        open: false,
-      
-        // 是否显示弹出层
-        open2: false,
-        title2: "",
-        open3: false,
-        title3: "",
-        imgsFileList:[]
-    };
+      first: [], // 一级分类列表
+      second: [], // 二级分类列表
+      tertiary: [], // 三级分类列表
+      num: 0, // 二级分类
+      sum: 0, // 三级分类
+      loading: false,
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+
+      // 是否显示弹出层
+      open2: false,
+      title2: '',
+      open3: false,
+      title3: '',
+      imgsFileList: []
+    }
   },
   computed: {
     headers() {
@@ -372,88 +372,87 @@ export default {
   methods: {
     reset3() {
       this.form3 = {
-        id:undefined,
-        companyId: "",
-        typeId: "",
-        secondId: "",
-        product: "",
-        number: "",
-        year: "",
-        face: "",
-        edition: "",
-        region: "",
-        grade: "",
-        highScores: "",
-        collection: "",
-        introduction: "",
-        postion: "",
-        status: "0",
-        urlPath: "",
-        deleteFlag: "",
-        gmtCreate: "",
-        gmtUpdate: "",
-        userId: "",
-        adminId: ""
-      };
-      this.resetForm("form3");
-    },
-    submitForm3: function() {debugger
+        id: undefined,
+        companyId: '',
+        typeId: '',
+        secondId: '',
+        product: '',
+        number: '',
+        year: '',
+        face: '',
+        edition: '',
+        region: '',
+        grade: '',
+        highScores: '',
+        collection: '',
+        introduction: '',
+        postion: '',
+        status: '0',
+        urlPath: '',
+        deleteFlag: '',
+        gmtCreate: '',
+        gmtUpdate: '',
+        userId: '',
+        adminId: ''
+      }
+      this.resetForm('form3')
+    },
+    submitForm3: function() { debugger
       this.form3.secondId = this.selectTwoType.id
-      this.$refs["form3"].validate(valid => {
+      this.$refs['form3'].validate(valid => {
         if (valid) {
           // this.form.urlPath = this.form.urlPath.toString()
           if (this.form3.id != undefined) {
             updateThree(this.form3).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open3 = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open3 = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
-           
             addThree(this.form3).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open3 = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open3 = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     handleAdd3() {
-      this.reset3();
-      this.open3 = true;
-      this.title3 = "添加三级分类";
+      this.reset3()
+      this.open3 = true
+      this.title3 = '添加三级分类'
     },
     handleUpdate3(row) {
-      this.reset3();
+      this.reset3()
       this.imgsFileList3 = []
       const id = row.id || this.ids.join(',')
       getThree(id).then(response => {
         this.form3 = response.data.data
-        this.open3 = true;
-        this.title3 = "修改三级分类";
-      });
+        this.open3 = true
+        this.title3 = '修改三级分类'
+      })
     },
     handleDelete3(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除分值信息编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delThree(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除分值信息编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delThree(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
     },
     uploadOverrun: function() {
       this.$message({
@@ -488,182 +487,180 @@ export default {
       }
     },
     handleAdd2() {
-      this.reset2();
-      this.open2 = true;
-      this.title2 = "添加二级分类";
+      this.reset2()
+      this.open2 = true
+      this.title2 = '添加二级分类'
       this.imgsFileList = []
     },
     /** 修改按钮操作 */
     handleUpdate2(row) {
-      this.reset2();
+      this.reset2()
       this.imgsFileList = []
       const id = row.id || this.ids.join(',')
       getSecond(id).then(response => {
-        response.data.data.urlPath = response.data.data.urlPath.split(",")
+        response.data.data.urlPath = response.data.data.urlPath.split(',')
         for (let i = 0; i < response.data.data.urlPath.length; i++) {
           this.imgsFileList.push({
             url: response.data.data.urlPath[i]
           })
         }
         this.form2 = response.data.data
-        this.open2 = true;
-        this.title2 = "修改二级分类";
+        this.open2 = true
+        this.title2 = '修改二级分类'
         console.log()
-        
-        
-      });
+      })
     },
     /** 提交按钮 */
-    submitForm2: function() {debugger
+    submitForm2: function() { debugger
       this.form2.typeId = this.selectOneType.id
-      this.$refs["form2"].validate(valid => {
+      this.$refs['form2'].validate(valid => {
         if (valid) {
           this.form2.urlPath = this.form2.urlPath.toString()
           if (this.form2.id != undefined) {
             updateSecond(this.form2).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open2 = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open2 = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
-            
             addSecond(this.form2).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open2 = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open2 = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete2(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除二级分类编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSecond(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除二级分类编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delSecond(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
     },
     cancel2() {
-        this.open2 = false;
-        this.reset2();
-      },
-      cancel3() {
-        this.open3 = false;
-        this.reset3();
-      },
-      reset2() {
+      this.open2 = false
+      this.reset2()
+    },
+    cancel3() {
+      this.open3 = false
+      this.reset3()
+    },
+    reset2() {
       this.form2 = {
         id: undefined,
         companyId: undefined,
         typeId: undefined,
         secondName: undefined,
         postion: undefined,
-        status: "0",
+        status: '0',
         urlPath: [],
         deleteFlag: undefined,
         gmtCreate: undefined,
         gmtUpdate: undefined,
         userId: undefined,
         adminId: undefined
-      };
-      this.resetForm("form2");
-    },
-       // 取消按钮
-       cancel() {
-        this.open = false;
-        this.reset();
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const id = row.id || this.ids.join(',')
-        getInfo(id).then(response => {
-          this.form = response.data.data
-          this.open = true;
-          this.title = "修改一级分类";
-        });
-      },
-      /** 提交按钮 */
-      submitForm: function() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.id != undefined) {
-              updateInfo(this.form).then(response => {
-                if (response.data) {
-                  this.msgSuccess("修改成功");
-                  this.open = false;
-                  this.getList();
-                } else {
-                  this.msgError(response.msg);
-                }
-              });
-            } else {
-              addInfo(this.form).then(response => {
-                if (response.data) {
-                  this.msgSuccess("新增成功");
-                  this.open = false;
-                  this.getList();
-                } else {
-                  this.msgError(response.msg);
-                }
-              });
-            }
+      }
+      this.resetForm('form2')
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset()
+      const id = row.id || this.ids.join(',')
+      getInfo(id).then(response => {
+        this.form = response.data.data
+        this.open = true
+        this.title = '修改一级分类'
+      })
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          if (this.form.id != undefined) {
+            updateInfo(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
+              } else {
+                this.msgError(response.msg)
+              }
+            })
+          } else {
+            addInfo(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
+              } else {
+                this.msgError(response.msg)
+              }
+            })
           }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        console.log(123)
-        const ids = row.id || this.ids.join(',')
-        this.$confirm('是否确认删除一级分类编号为"' + ids + '"的数据项?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            return delInfo(ids);
-          }).then(() => {
-            this.getList();
-            this.msgSuccess("删除成功");
-          }).catch(function() {});
-      },
+        }
+      })
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      console.log(123)
+      const ids = row.id || this.ids.join(',')
+      this.$confirm('是否确认删除一级分类编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delInfo(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
+    },
     reset() {
-        this.form = {
-          id: undefined,
-          companyId: undefined,
-          typeName: undefined,
-          postion: undefined,
-          status: "0",
-          deleteFlag: undefined,
-          gmtCreate: undefined,
-          gmtUpdate: undefined,
-          userId: undefined,
-          adminId: undefined
-        };
-        this.resetForm("form");
-      },
+      this.form = {
+        id: undefined,
+        companyId: undefined,
+        typeName: undefined,
+        postion: undefined,
+        status: '0',
+        deleteFlag: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        userId: undefined,
+        adminId: undefined
+      }
+      this.resetForm('form')
+    },
     handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加一级分类";
-      },
+      this.reset()
+      this.open = true
+      this.title = '添加一级分类'
+    },
     // 分类列表
-    getList() { //接口方法
-      // this.loading = true
+    getList() { // 接口方法
+      debugger
+      this.loading = true
       // this.$api.amys.shopGroup.list().then(res => {
       //   if (res.data && res.status == "00000") {
       //     this.arrList = this.resFormat(res.data) //搜索一级分类
@@ -689,20 +686,18 @@ export default {
         // }
         // this.total = response.data.data.count
         // this.loading = false;
-      });
-      
- 
+      })
     },
     makeData(val) {
       for (let i = 0; i < val.length; i++) {
         if (val[i].children) {
           for (let j = 0; j < val[i].children.length; j++) {
-            let _obj = val[i].children[j]
+            const _obj = val[i].children[j]
             _obj.typeName = val[i].children[j].secondName
             val[i].children[j] = _obj
             if (val[i].children[j].children) {
               for (let k = 0; k < val[i].children[j].children.length; k++) {
-                let _obj1 = val[i].children[j].children[k]
+                const _obj1 = val[i].children[j].children[k]
                 _obj1.typeName = val[i].children[j].children[k].typeId
                 val[i].children[j].children[k] = _obj1
               }
@@ -712,94 +707,94 @@ export default {
       }
       this.first = val
       console.log(this.data)
-      this.arrList = this.resFormat(this.first) //搜索一级分类
-          this.superList = this.arrList //分类列表
-          this.loading = false
-          this.restaurants = []; //搜索框列表
-          this.listType() //tab切换
-          this.searchList(this.first)//搜素框递归查找分类
-    },
-     // 分类切换
-    tabClass(type,index){debugger
-      console.log(type,index)
-      if(type == '1'){
+      this.arrList = this.resFormat(this.first) // 搜索一级分类
+      this.superList = this.arrList // 分类列表
+      this.loading = false
+      this.restaurants = [] // 搜索框列表
+      this.listType() // tab切换
+      this.searchList(this.first)// 搜素框递归查找分类
+    },
+    // 分类切换
+    tabClass(type, index) { debugger
+      console.log(type, index)
+      if (type == '1') {
         this.num = index
         this.selectOneType = this.arrList[index]
         console.log(this.selectOneType)
-      console.log(this.first,'一级分类')
-      }else{
+        console.log(this.first, '一级分类')
+      } else {
         this.sum = index
-      this.selectTwoType = this.second[index]
+        this.selectTwoType = this.second[index]
       }
       this.listType()
     },
-    listType(){ //分类查找
+    listType() { // 分类查找
       debugger
       this.first = this.arrList
-      console.log(this.first,'一级分类')
+      console.log(this.first, '一级分类')
       this.second = this.first[this.num] && this.first[this.num].children ? this.first[this.num].children: ''
-      console.log(this.second,'二级分类')
+      console.log(this.second, '二级分类')
       this.tertiary = this.second[this.sum] && this.second[this.sum].children ? this.second[this.sum].children :''
-      console.log(this.tertiary,'三级分类')
+      console.log(this.tertiary, '三级分类')
     },
-    resFormat(arr) { //递归查找一级分类
-      return arr.map(item=>{
-        item.popover = false;
-        if(item.children && item.children.length > 0){
-            item.children = this.resFormat(item.children)
+    resFormat(arr) { // 递归查找一级分类
+      return arr.map(item => {
+        item.popover = false
+        if (item.children && item.children.length > 0) {
+          item.children = this.resFormat(item.children)
         }
         return item
       })
     },
-    //原程搜索分类
+    // 原程搜索分类
     querySearchAsync(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
+      var restaurants = this.restaurants
+      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
       this.searchChoose = null
-      cb(results);
+      cb(results)
     },
     createStateFilter(queryString) {
       console.log(queryString)
       return (state) => {
-        return state.value.toLowerCase().indexOf(queryString.toLowerCase()) >= 0;
-      };
+        return state.value.toLowerCase().indexOf(queryString.toLowerCase()) >= 0
+      }
     },
-    searchList(arr,value){ //搜索时递归查找分类
+    searchList(arr, value) { // 搜索时递归查找分类
       arr.forEach(item => {
-        if(value){
+        if (value) {
           item.value = `${value} > ${item.title}`
-        }else{
+        } else {
           item.value = item.title
         }
         this.restaurants.push(item)
-        if(item.children){
-          return this.searchList(item.children,item.value)
+        if (item.children) {
+          return this.searchList(item.children, item.value)
         }
-      });
+      })
     },
-    handleSelect(e) { //搜索
+    handleSelect(e) { // 搜索
       this.searchChoose = e
       this.getSearch()
     },
     getSearch() {
       let value = null
       let id = ''
-      if(this.search || this.searchChoose){
+      if (this.search || this.searchChoose) {
         value = this.searchChoose
-        this.restaurants.forEach(item=>{
-          if(item.value === this.search){ //查找列表里和输入搜索框里的信息一样的执行
+        this.restaurants.forEach(item => {
+          if (item.value === this.search) { // 查找列表里和输入搜索框里的信息一样的执行
             value = item
           }
         })
         // 第二步 查找对应分类中的id
-        if(value){
-          if(value.level === 1){
+        if (value) {
+          if (value.level === 1) {
             id = value.id
           }
-          if(value.level > 1){
+          if (value.level > 1) {
             id = value.previous
           }
-          this.arrList = this.parentFormat(this.superList,id)
+          this.arrList = this.parentFormat(this.superList, id)
           this.listType()
           return
         }
@@ -807,33 +802,33 @@ export default {
       this.arrList = this.superList
       this.listType()
     },
-    parentFormat(arr,id){
-      console.log(arr,id)
-      if(!arr || !id){
-        return 
+    parentFormat(arr, id) {
+      console.log(arr, id)
+      if (!arr || !id) {
+        return
       }
-      let arrs = []
+      const arrs = []
       // 递归查找上一级
-      function des(arr,data){
-        arr.forEach(item=>{
-          if(item.id === id){
-            if(data){
+      function des(arr, data) {
+        arr.forEach(item => {
+          if (item.id === id) {
+            if (data) {
               return arrs.push(data)
             }
             return arrs.push(item)
           }
-          if(item.children){
-            return des(item.children,item)
+          if (item.children) {
+            return des(item.children, item)
           }
         })
       }
-      des(arr,null)
+      des(arr, null)
       return arrs
     },
-    //排序
-    editSort() {},
-  },
-};
+    // 排序
+    editSort() {}
+  }
+}
 </script>
 <style>
   .el-scrollbar__wrap {
@@ -841,7 +836,7 @@ export default {
 }
 </style>
 <style  scoped>
- 
+
 .right-info-box {
   width: calc(100%);
 }
@@ -849,7 +844,7 @@ export default {
   background-color: #fff;
   padding: 24px;
 }
- 
+
   .group_card {
     background-color: #fff;
     padding: 20px;
@@ -910,7 +905,7 @@ export default {
       width: 56px;
       height: 28px;
     }
- 
+
   .item_name_title {
     font-size: 14px;
     margin-left: 5px;
@@ -930,7 +925,7 @@ export default {
   .showIcon:hover {
     opacity: 1;
   }
- 
+
 .item_handle {
   margin-right: 20px;
   width: 35%;
@@ -944,4 +939,4 @@ export default {
   width: 15%;
   text-align: center;
 }
-</style>
+</style>

+ 100 - 99
unimall-admin/src/views/gubi/three/index.vue

@@ -183,40 +183,40 @@
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
+          v-permission="['gubi:three:add']"
           type="primary"
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-permission="['gubi:three:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['gubi:three:edit']"
+          :disabled="single"
           type="success"
           icon="el-icon-edit"
           size="mini"
-          :disabled="single"
           @click="handleUpdate"
-          v-permission="['gubi:three:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['gubi:three:remove']"
+          :disabled="multiple"
           type="danger"
           icon="el-icon-delete"
           size="mini"
-          :disabled="multiple"
           @click="handleDelete"
-          v-permission="['gubi:three:remove']"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['gubi:three:export']"
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-permission="['gubi:three:export']"
         >导出</el-button>
       </el-col>
     </el-row>
@@ -244,16 +244,17 @@
       <el-table-column label="详细介绍" align="center" prop="introduction" />
       <!-- <el-table-column label="排序" align="center" prop="postion" />
       <el-table-column label="状态" align="center" prop="status" /> -->
-      <el-table-column 
-      align="center" 
-      property="urlPath" 
-      label="图片">
-      <template slot-scope="scope">
-        <img v-for="item in scope.row.urlPath"
-          :src="item" 
-          width="40" >
-      </template>
-    </el-table-column>
+      <el-table-column
+        align="center"
+        property="urlPath"
+        label="图片">
+        <template slot-scope="scope">
+          <img
+            v-for="item in scope.row.urlPath"
+            :src="item"
+            width="40" >
+        </template>
+      </el-table-column>
       <!-- <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
       <!-- <el-table-column label="" align="center" prop="gmtCreate" width="180">
         <template slot-scope="scope">
@@ -270,23 +271,23 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
+            v-permission="['gubi:three:edit']"
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-permission="['gubi:three:edit']"
           >修改</el-button>
           <el-button
+            v-permission="['gubi:three:remove']"
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-permission="['gubi:three:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -341,12 +342,14 @@
           <el-input v-model="form.highScores" placeholder="请输入高分数量" />
         </el-form-item>
         <el-form-item label="收集时间" prop="collection">
-          <el-date-picker clearable size="small" style="width: 100%"
+          <el-date-picker
             v-model="form.collection"
+            clearable
+            size="small"
+            style="width: 100%"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择收集时间">
-          </el-date-picker>
+            placeholder="选择收集时间"/>
         </el-form-item>
         <el-form-item label="详细介绍" prop="introduction">
           <el-input v-model="form.introduction" placeholder="请输入详细介绍" />
@@ -374,7 +377,7 @@
           >
             <i class="el-icon-plus" />
           </el-upload>
-        </el-form-item> 
+        </el-form-item>
         <!-- <el-form-item label="0:否" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
         </el-form-item>
@@ -410,8 +413,8 @@
 </template>
 
 <script>
-import { listThree, getThree, delThree, addThree, updateThree, exportThree } from "@/api/gubi/three";
-import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from "@/api/gubi/second";
+import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
 import { uploadPath } from '@/api/storage'
 import { getToken } from '@/utils/auth'
 export default {
@@ -419,7 +422,7 @@ export default {
     return {
       imgsFileList: [],
       uploadPath,
-      secondList:[],
+      secondList: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -433,7 +436,7 @@ export default {
       // 分值信息表格数据
       threeList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -455,7 +458,7 @@ export default {
         introduction: undefined,
         postion: undefined,
         status: undefined,
-        urlPath:undefined,
+        urlPath: undefined,
         deleteFlag: undefined,
         gmtCreate: undefined,
         gmtUpdate: undefined,
@@ -467,9 +470,9 @@ export default {
       // 表单校验
       rules: {
         deleteFlag: [
-          { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
-        ],      }
-    };
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ] }
+    }
   },
   computed: {
     headers() {
@@ -479,7 +482,7 @@ export default {
     }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     uploadOverrun: function() {
@@ -516,37 +519,36 @@ export default {
     },
     /** 查询分值信息列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listSecond().then(response => {
         this.secondList = response.data.data.items
-        
-        for(let i =0;i<this.secondList.length;i++){
-          if(this.secondList[i].urlPath){
+
+        for (let i =0; i<this.secondList.length; i++) {
+          if (this.secondList[i].urlPath) {
             this.secondList[i].urlPath = this.secondList[i].urlPath.split(',')
-        }else{
-          this.secondList[i].urlPath=[]
-        }
+          } else {
+            this.secondList[i].urlPath=[]
+          }
         }
         console.log(this.secondList)
-      });
+      })
       listThree(this.queryParams).then(response => {
         this.threeList = response.data.data.items
-        for(let i =0;i<this.threeList.length;i++){
-          if(this.threeList[i].urlPath){
+        for (let i =0; i<this.threeList.length; i++) {
+          if (this.threeList[i].urlPath) {
             this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
-        }else{
-          this.threeList[i].urlPath=[]
-        }
+          } else {
+            this.threeList[i].urlPath=[]
+          }
         }
         this.total = response.data.data.count
-        this.loading = false;
-      });
-
+        this.loading = false
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -566,25 +568,25 @@ export default {
         collection: undefined,
         introduction: undefined,
         postion: undefined,
-        status: "0",
+        status: '0',
         urlPath: [],
         deleteFlag: undefined,
         gmtCreate: undefined,
         gmtUpdate: undefined,
         userId: undefined,
         adminId: undefined
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -594,78 +596,77 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加分值信息";
+      this.reset()
+      this.open = true
+      this.title = '添加分值信息'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       this.imgsFileList = []
       const id = row.id || this.ids.join(',')
       getThree(id).then(response => {
         this.form = response.data.data
-        this.open = true;
-        this.title = "修改分值信息";
-      });
+        this.open = true
+        this.title = '修改分值信息'
+      })
     },
     /** 提交按钮 */
     submitForm: function() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           this.form.urlPath = this.form.urlPath.toString()
           if (this.form.id != undefined) {
             updateThree(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
-           
             addThree(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除分值信息编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delThree(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除分值信息编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delThree(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有分值信息数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportThree(queryParams);
-        }).then(response => {
-          this.download(response.data.data);
-        }).catch(function() {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有分值信息数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportThree(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
     }
   }
-};
-</script>
+}
+</script>

+ 156 - 92
unimall-admin/src/views/gubi/three/index1.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+  <div v-loading="loading" class="app-container">
+    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
       <!-- <el-form-item label="" prop="companyId">
         <el-input
           v-model="queryParams.companyId"
@@ -177,9 +177,14 @@
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          size="mini"
+          @click="sx"
+        >筛选</el-button>
       </el-form-item>
     </el-form>
-<!-- 
+    <!--
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -244,16 +249,17 @@
       <el-table-column label="详细介绍" align="center" prop="introduction" />
       <!-- <el-table-column label="排序" align="center" prop="postion" />
       <el-table-column label="状态" align="center" prop="status" /> -->
-      <el-table-column 
-      align="center" 
-      property="urlPath" 
-      label="图片">
-      <template slot-scope="scope">
-        <img v-for="item in scope.row.urlPath"
-          :src="item" 
-          width="40" >
-      </template>
-    </el-table-column>
+      <el-table-column
+        align="center"
+        property="urlPath"
+        label="图片">
+        <template slot-scope="scope">
+          <img
+            v-for="item in scope.row.urlPath"
+            :src="item"
+            width="40" >
+        </template>
+      </el-table-column>
       <!-- <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
       <!-- <el-table-column label="" align="center" prop="gmtCreate" width="180">
         <template slot-scope="scope">
@@ -270,11 +276,11 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
+            v-permission="['gubi:three:edit']"
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-permission="['gubi:three:edit']"
           >修改</el-button>
           <!-- <el-button
             size="mini"
@@ -286,7 +292,7 @@
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -335,12 +341,14 @@
           <el-input v-model="form.highScores" placeholder="请输入高分数量" />
         </el-form-item>
         <el-form-item label="收集时间" prop="collection">
-          <el-date-picker clearable size="small" style="width: 100%"
+          <el-date-picker
             v-model="form.collection"
+            clearable
+            size="small"
+            style="width: 100%"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择收集时间">
-          </el-date-picker>
+            placeholder="选择收集时间"/>
         </el-form-item>
         <el-form-item label="详细介绍" prop="introduction">
           <el-input v-model="form.introduction" placeholder="请输入详细介绍" />
@@ -368,7 +376,7 @@
           >
             <i class="el-icon-plus" />
           </el-upload>
-        </el-form-item> 
+        </el-form-item>
         <!-- <el-form-item label="0:否" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
         </el-form-item>
@@ -400,20 +408,35 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    <el-dialog :visible.sync="dialogFormVisible1" title="分类">
+      <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="typeConfirm">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listThree, getThree, delThree, addThree, updateThree, exportThree } from "@/api/gubi/three";
-import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from "@/api/gubi/second";
+import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
+import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
+import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
 import { uploadPath } from '@/api/storage'
 import { getToken } from '@/utils/auth'
 export default {
   data() {
     return {
+      defaultProps: {
+        children: 'children',
+        label: 'typeName'
+      },
+      data: [],
+      dialogFormVisible1: false,
       imgsFileList: [],
       uploadPath,
-      secondList:[],
+      secondList: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -427,7 +450,7 @@ export default {
       // 分值信息表格数据
       threeList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -451,7 +474,7 @@ export default {
         introduction: undefined,
         postion: undefined,
         status: undefined,
-        urlPath:undefined,
+        urlPath: undefined,
         deleteFlag: undefined,
         gmtCreate: undefined,
         gmtUpdate: undefined,
@@ -463,9 +486,9 @@ export default {
       // 表单校验
       rules: {
         deleteFlag: [
-          { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
-        ],      }
-    };
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ] }
+    }
   },
   computed: {
     headers() {
@@ -475,9 +498,20 @@ export default {
     }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
+    typeConfirm() {
+      this.dialogFormVisible1 = false
+      this.handleQuery()
+    },
+    sx() {
+      this.dialogFormVisible1 = true
+    },
+    handleNodeClick(data) {
+      console.log(data)
+      this.queryParams.secondName = data.typeName
+    },
     uploadOverrun: function() {
       this.$message({
         type: 'error',
@@ -512,21 +546,34 @@ export default {
     },
     /** 查询分值信息列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listSecond(this.queryParams).then(response => {
         this.secondList = response.data.data.items
-        
-        for(let i =0;i<this.secondList.length;i++){
-          if(this.secondList[i].urlPath){
+
+        for (let i =0; i<this.secondList.length; i++) {
+          if (this.secondList[i].urlPath) {
             this.secondList[i].urlPath = this.secondList[i].urlPath.split(',')
-        }else{
-          this.secondList[i].urlPath=[]
-        }
+          } else {
+            this.secondList[i].urlPath=[]
+          }
         }
         console.log(this.secondList)
         this.total = response.data.data.count
-        this.loading = false;
-      });
+      })
+      typeList().then(response => {
+        this.makeData(response.data.data)
+        this.loading = false
+        // this.threeList = response.data.data.items
+        // for(let i =0;i<this.threeList.length;i++){
+        //   if(this.threeList[i].urlPath){
+        //     this.threeList[i].urlPath = this.threeList[i].urlPath.split(',')
+        // }else{
+        //   this.threeList[i].urlPath=[]
+        // }
+        // }
+        // this.total = response.data.data.count
+        // this.loading = false;
+      })
       // listThree(this.queryParams).then(response => {
       //   this.threeList = response.data.data.items
       //   for(let i =0;i<this.threeList.length;i++){
@@ -539,12 +586,32 @@ export default {
       //   this.total = response.data.data.count
       //   this.loading = false;
       // });
-
+    },
+    makeData(val) {
+      for (let i = 0; i < val.length; i++) {
+        if (val[i].children) {
+          for (let j = 0; j < val[i].children.length; j++) {
+            const _obj = val[i].children[j]
+            _obj.typeName = val[i].children[j].secondName
+            val[i].children[j] = _obj
+            if (val[i].children[j].children) {
+              val[i].children[j].children = []
+              // for (let k = 0; k < val[i].children[j].children.length; k++) {
+              //   const _obj1 = val[i].children[j].children[k]
+              //   _obj1.typeName = val[i].children[j].children[k].typeId
+              //   val[i].children[j].children[k] = _obj1
+              // }
+            }
+          }
+        }
+      }
+      this.data = val
+      console.log(this.data)
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -564,25 +631,25 @@ export default {
         collection: undefined,
         introduction: undefined,
         postion: undefined,
-        status: "0",
+        status: '0',
         urlPath: [],
         deleteFlag: undefined,
         gmtCreate: undefined,
         gmtUpdate: undefined,
         userId: undefined,
         adminId: undefined
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -592,87 +659,84 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加分值信息";
+      this.reset()
+      this.open = true
+      this.title = '添加分值信息'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       this.imgsFileList = []
       const id = row.id || this.ids.join(',')
       getSecond(id).then(response => {
-        response.data.data.urlPath = response.data.data.urlPath.split(",")
+        response.data.data.urlPath = response.data.data.urlPath.split(',')
         for (let i = 0; i < response.data.data.urlPath.length; i++) {
           this.imgsFileList.push({
             url: response.data.data.urlPath[i]
           })
         }
         this.form = response.data.data
-        this.open = true;
-        this.title = "修改币种信息";
+        this.open = true
+        this.title = '修改币种信息'
         console.log()
-        
-        
-      });
+      })
     },
     /** 提交按钮 */
     submitForm: function() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           this.form.urlPath = this.form.urlPath.toString()
           if (this.form.id != undefined) {
             updateSecond(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
-            
             addSecond(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除分值信息编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delThree(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除分值信息编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delThree(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有分值信息数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportThree(queryParams);
-        }).then(response => {
-          this.download(response.data.data);
-        }).catch(function() {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有分值信息数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportThree(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
     }
   }
-};
-</script>
+}
+</script>