|
@@ -21,29 +21,20 @@
|
|
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="45" style="color: red;" align="center" />
|
|
<el-table-column type="selection" width="45" style="color: red;" align="center" />
|
|
<template v-for="(item, index) in tabData">
|
|
<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] -->
|
|
<!-- :style="scope.row.list_class" scope.row[scope.column.property] -->
|
|
<template slot-scope="scope" >
|
|
<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="">
|
|
: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>
|
|
<span :style="scope.row.list_class" v-else-if="item.columnName == 'status' ">{{ scope.row[scope.column.property] }}</span>
|
|
<div v-else>
|
|
<div v-else>
|
|
<span v-if="item.fkInfo">{{scope.row[scope.column.property].value}}</span>
|
|
<span v-if="item.fkInfo">{{scope.row[scope.column.property].value}}</span>
|
|
<span v-else>{{scope.row[scope.column.property]}}</span>
|
|
<span v-else>{{scope.row[scope.column.property]}}</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</template>
|
|
</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>
|
|
</el-table>
|
|
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
@pagination="getList" />
|
|
@pagination="getList" />
|
|
@@ -59,8 +50,7 @@
|
|
addbjectSave,
|
|
addbjectSave,
|
|
getByTableName,
|
|
getByTableName,
|
|
delMenu,
|
|
delMenu,
|
|
- getObject,
|
|
|
|
- ancellation
|
|
|
|
|
|
+ getObject
|
|
} from '@/api/system/table.js'
|
|
} from '@/api/system/table.js'
|
|
import {
|
|
import {
|
|
mapGetters,
|
|
mapGetters,
|
|
@@ -108,9 +98,7 @@
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- },
|
|
|
|
- // 销假参数
|
|
|
|
- anges:[]
|
|
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
@@ -150,9 +138,6 @@
|
|
return res.path == path.split('/')[2]
|
|
return res.path == path.split('/')[2]
|
|
})[0]
|
|
})[0]
|
|
this.tabName = items.sysTableName
|
|
this.tabName = items.sysTableName
|
|
- if(this.tabName == 'boman_temp_leaveform'){
|
|
|
|
- this.queryParams.fixedData.condition.leave_status = 'N'
|
|
|
|
- }
|
|
|
|
this.queryParams.table = items.sysTableName
|
|
this.queryParams.table = items.sysTableName
|
|
this.form.table = items.sysTableName
|
|
this.form.table = items.sysTableName
|
|
this.init();
|
|
this.init();
|
|
@@ -206,7 +191,7 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- headerBtn(item,inhe) {
|
|
|
|
|
|
+ headerBtn(item) {
|
|
const _this = this
|
|
const _this = this
|
|
switch (item) {
|
|
switch (item) {
|
|
case 'A':
|
|
case 'A':
|
|
@@ -215,58 +200,29 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
case 'M':
|
|
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
|
|
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':
|
|
case 'D':
|
|
{
|
|
{
|
|
- if (this.multiple && inhe == undefined) {
|
|
|
|
|
|
+ if (this.multiple) {
|
|
this.msgInfo('请勾选一条信息')
|
|
this.msgInfo('请勾选一条信息')
|
|
return
|
|
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: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(function() {
|
|
}).then(function() {
|
|
return delMenu({
|
|
return delMenu({
|
|
table: _this.tabName,
|
|
table: _this.tabName,
|
|
- idList: id
|
|
|
|
|
|
+ idList: _this.ids
|
|
});
|
|
});
|
|
}).then(() => {
|
|
}).then(() => {
|
|
_this.getList();
|
|
_this.getList();
|
|
@@ -274,8 +230,6 @@
|
|
})
|
|
})
|
|
|
|
|
|
return
|
|
return
|
|
-
|
|
|
|
- return
|
|
|
|
}
|
|
}
|
|
case 'Q':
|
|
case 'Q':
|
|
{
|
|
{
|
|
@@ -373,22 +327,7 @@
|
|
this.queryData = data
|
|
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>
|
|
</script>
|