Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

zhonghui 3 gadi atpakaļ
vecāks
revīzija
5436e945be
2 mainītis faili ar 19 papildinājumiem un 80 dzēšanām
  1. 2 2
      src/settings.js
  2. 17 78
      src/views/system/surface/index.vue

+ 2 - 2
src/settings.js

@@ -1,8 +1,8 @@
 module.exports = {
   title: '潜山市云数据中心',
   // urls: `http://118.178.139.79:7090`,
-  // urls: `http://192.168.101.11:8090`,
-   urls: `http://192.168.101.49:8090`,
+  urls: `http://192.168.101.11:8090`,
+   // urls: `http://192.168.101.49:8090`,
 
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light

+ 17 - 78
src/views/system/surface/index.vue

@@ -21,29 +21,20 @@
       <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="45" style="color: red;" align="center" />
         <template v-for="(item, index) in tabData">
-          <el-table-column :width="item.columnComment =='编号'? '50' : tabData.length>11?zjFn(item.columnComment)*19:'auto'" :label="item.columnComment" align="center" :prop="item.columnName" :key="index" show-overflow-tooltip>
+          <el-table-column :width="item.columnComment =='编号'? '50' : tabData.length>13?zjFn(item.columnComment)*19:'auto'" :label="item.columnComment" align="center" :prop="item.columnName" :key="index" show-overflow-tooltip>
           <!-- :style="scope.row.list_class" scope.row[scope.column.property] -->
             <template slot-scope="scope"  >
-              <img class="img_icon" v-if="item.htmlType=='imageUpload' && scope.row[scope.column.property] && scope.row[scope.column.property] !== '[]' " @click="imgBtn(JSON.parse(scope.row[scope.column.property])[0].url)"
+              <img class="img_icon" v-if="item.htmlType=='imageUpload' && scope.row[scope.column.property] && scope.row[scope.column.property] !== '[]'" @click="imgBtn(JSON.parse(scope.row[scope.column.property])[0].url)"
                 :src="scope.row[scope.column.property] == '[]' ? '' : JSON.parse(scope.row[scope.column.property])[0].url  " alt="">
-             <span  v-else-if="item.htmlType=='imageUpload' && scope.row[scope.column.property] && scope.row[scope.column.property] == '[]' || scope.row[scope.column.property] == ''">暂无数据</span>
+             <span :style="scope.row.list_class" v-else-if="item.htmlType=='imageUpload' && scope.row[scope.column.property] && scope.row[scope.column.property] == '[]'">暂无图片</span>
               <span :style="scope.row.list_class" v-else-if="item.columnName == 'status' ">{{ scope.row[scope.column.property] }}</span>
               <div v-else>
                 <span v-if="item.fkInfo">{{scope.row[scope.column.property].value}}</span>
                 <span v-else>{{scope.row[scope.column.property]}}</span>
               </div>
             </template>
-
           </el-table-column>
         </template>
-        <el-table-column  label="操作" align="center" class-name="small-padding fixed-width">
-          <template slot-scope="scope">
-            <el-button type="text" :icon="item == 'A' ? 'el-icon-plus' : item == 'M' ? 'el-icon-edit' : item == 'D' ? 'el-icon-delete' : 'el-icon-view'" plain @click.stop="headerBtn(item,scope.row,2)" size="small" v-for="(item,index) in queryData.buttonList.split('').filter((res) => {return res!='S' && res!='A' && res!='Q' && res!='U'})"
-              :key="index +'name'"  >{{item | btnConversion}}</el-button>
-              <!-- this.tabName -->
-               <el-button type="text" icon="el-icon-delete" size="mini" @click="xiaoj(scope.row,2)" v-if="tabName == 'boman_temp_leaveform'">销假</el-button>
-          </template>
-        </el-table-column>
       </el-table>
       <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
         @pagination="getList" />
@@ -59,8 +50,7 @@
     addbjectSave,
     getByTableName,
     delMenu,
-    getObject,
-    ancellation
+    getObject
   } from '@/api/system/table.js'
   import {
     mapGetters,
@@ -108,9 +98,7 @@
 
             }
           }
-        },
-        // 销假参数
-        anges:[]
+        }
       };
     },
     filters: {
@@ -150,9 +138,6 @@
         return res.path == path.split('/')[2]
       })[0]
       this.tabName = items.sysTableName
-      if(this.tabName == 'boman_temp_leaveform'){
-        this.queryParams.fixedData.condition.leave_status = 'N'
-      }
       this.queryParams.table = items.sysTableName
       this.form.table = items.sysTableName
       this.init();
@@ -206,7 +191,7 @@
           })
         }
       },
-      headerBtn(item,inhe) {
+      headerBtn(item) {
         const _this = this
         switch (item) {
           case 'A':
@@ -215,58 +200,29 @@
               return
             }
           case 'M':
-          {
-            if (this.single && inhe == undefined) {
-              this.msgInfo('请勾选一条信息')
+            {
+              if (this.single) {
+                this.msgInfo('请勾选一条信息')
+                return
+              }
+              const id = this.ids.join(',')
+              this.routerFn(id, this.tabName)
               return
             }
-            // const id = inhe.id ||  this.ids.join(',')
-            let id = []
-            if(inhe !== undefined){
-              let jie = []
-              jie.push(inhe.id)
-              id = jie.join('')
-            }else{
-              id =  _this.ids.join('')
-              console.log(id)
-            }
-            this.routerFn(id, this.tabName)
-            return
-          }
-            // {
-            //   if (this.single) {
-            //     this.msgInfo('请勾选一条信息')
-            //     return
-            //   }
-            //   const id = this.ids.join(',')
-            //   this.routerFn(id, this.tabName)
-            //   return
-            // }
           case 'D':
             {
-              if (this.multiple && inhe == undefined) {
+              if (this.multiple) {
                 this.msgInfo('请勾选一条信息')
                 return
               }
-              //  console.log(_this.ids.join(','))
-              let id = []
-              if(inhe !== undefined){
-                let jie = []
-                jie.push(inhe.id)
-                 id = jie
-              }else{
-                id =  _this.ids
-                console.log(id)
-              }
-              console.log(id)
-              this.$confirm('是否确认删除?', "警告", {
+              this.$confirm('是否确认删除岗位编号为"' + this.ids + '"的数据项?', "警告", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 type: "warning"
               }).then(function() {
                 return delMenu({
                   table: _this.tabName,
-                  idList: id
+                  idList: _this.ids
                 });
               }).then(() => {
                 _this.getList();
@@ -274,8 +230,6 @@
               })
 
               return
-
-              return
             }
           case 'Q':
             {
@@ -373,22 +327,7 @@
           this.queryData = data
         })
       },
-      handleChange(val) {},
-      // 点击销假
-      xiaoj(val,index){
-        console.log(val)
-        this.anges.push(val.id)
-        this.anges =JSON.stringify(this.anges)
-        console.log(this.anges)
-        ancellation(this.anges).then(res =>{
-           console.log(res)
-           if(res.code == 200){
-             this.msgSuccess("操作成功");
-             this.queryParams.fixedData.condition.leave_status = 'N'
-             this.getList()
-           }
-        })
-      }
+      handleChange(val) {}
     },
   };
 </script>