|
@@ -4,20 +4,20 @@
|
|
<el-form-item label="岗位" prop="usePost">
|
|
<el-form-item label="岗位" prop="usePost">
|
|
<el-select v-model="queryParams.usePost" clearable placeholder="请选择应配备岗位" size="small">
|
|
<el-select v-model="queryParams.usePost" clearable placeholder="请选择应配备岗位" size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in usePostOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in usePostOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="PPE种类" prop="ppeType">
|
|
<el-form-item label="PPE种类" prop="ppeType">
|
|
<el-input
|
|
<el-input
|
|
- v-model="queryParams.ppeType"
|
|
|
|
- clearable
|
|
|
|
- placeholder="请输入PPE种类"
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
|
|
+ v-model="queryParams.ppeType"
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请输入PPE种类"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -29,33 +29,30 @@
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
- v-hasPermi="['production:matrix:add']"
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
- size="mini"
|
|
|
|
- type="primary"
|
|
|
|
- @click="handleAdd"
|
|
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="handleAdd"
|
|
>新增
|
|
>新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
- v-hasPermi="['production:matrix:edit']"
|
|
|
|
- :disabled="single"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="mini"
|
|
|
|
- type="success"
|
|
|
|
- @click="handleUpdate"
|
|
|
|
|
|
+ :disabled="single"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="success"
|
|
|
|
+ @click="handleUpdate"
|
|
>修改
|
|
>修改
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
- v-hasPermi="['production:matrix:remove']"
|
|
|
|
- :disabled="multiple"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- size="mini"
|
|
|
|
- type="danger"
|
|
|
|
- @click="handleDelete"
|
|
|
|
|
|
+ :disabled="multiple"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="handleDelete"
|
|
>删除
|
|
>删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -67,23 +64,22 @@
|
|
<el-table-column align="center" type="selection" width="55"/>
|
|
<el-table-column align="center" type="selection" width="55"/>
|
|
<el-table-column :formatter="usePostFormat" align="center" label="岗位" prop="usePost"/>
|
|
<el-table-column :formatter="usePostFormat" align="center" label="岗位" prop="usePost"/>
|
|
<el-table-column :show-overflow-tooltip="true" align="center" label="PPE种类" prop="ppeType"/>
|
|
<el-table-column :show-overflow-tooltip="true" align="center" label="PPE种类" prop="ppeType"/>
|
|
- <el-table-column :show-overflow-tooltip="true" :formatter="personFormat" align="center" label="指定人" prop="assigner"/>
|
|
|
|
|
|
+ <el-table-column :formatter="personFormat" :show-overflow-tooltip="true" align="center" label="指定人"
|
|
|
|
+ prop="assigner"/>
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
- v-hasPermi="['production:matrix:edit']"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
>修改
|
|
>修改
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- v-hasPermi="['production:matrix:remove']"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
>删除
|
|
>删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -91,12 +87,12 @@
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
<pagination
|
|
- v-show="total>0"
|
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
|
- :page-sizes="[20,50,100]"
|
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
|
- :total="total"
|
|
|
|
- @pagination="getList"
|
|
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ :page-sizes="[20,50,100]"
|
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
|
+ :total="total"
|
|
|
|
+ @pagination="getList"
|
|
/>
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改ppe矩阵管理对话框 -->
|
|
<!-- 添加或修改ppe矩阵管理对话框 -->
|
|
@@ -108,10 +104,10 @@
|
|
<el-form-item label="应配备岗位" prop="usePost">
|
|
<el-form-item label="应配备岗位" prop="usePost">
|
|
<el-select v-model="form.usePost" placeholder="请选择应配备岗位">
|
|
<el-select v-model="form.usePost" placeholder="请选择应配备岗位">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in usePostOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in usePostOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -121,10 +117,10 @@
|
|
<el-form-item v-if="form.isAssigner" label="指定人" prop="assigner">
|
|
<el-form-item v-if="form.isAssigner" label="指定人" prop="assigner">
|
|
<el-select v-model="form.assigner" clearable filterable multiple placeholder="请选择指定人">
|
|
<el-select v-model="form.assigner" clearable filterable multiple placeholder="请选择指定人">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in personOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel+'_'+dict.dictValue"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in personOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel+'_'+dict.dictValue"
|
|
|
|
+ :value="dict.dictValue"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -248,8 +244,8 @@ export default {
|
|
this.usePostOptions = response.data;
|
|
this.usePostOptions = response.data;
|
|
});
|
|
});
|
|
listAllPerson({}).then(res => {
|
|
listAllPerson({}).then(res => {
|
|
- res.data.forEach(item=>{
|
|
|
|
- this.personOptions.push({dictValue:item.employeeid,dictLabel:item.name})
|
|
|
|
|
|
+ res.data.forEach(item => {
|
|
|
|
+ this.personOptions.push({dictValue: item.employeeid, dictLabel: item.name})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -275,7 +271,7 @@ export default {
|
|
},
|
|
},
|
|
// 指定人字典翻译
|
|
// 指定人字典翻译
|
|
personFormat(row, column) {
|
|
personFormat(row, column) {
|
|
- return this.selectDictLabels(this.personOptions, row.assigner,',');
|
|
|
|
|
|
+ return this.selectDictLabels(this.personOptions, row.assigner, ',');
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
@@ -341,8 +337,8 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.assigner)
|
|
if (this.form.assigner)
|
|
this.form.assigner = this.form.assigner.join(',')
|
|
this.form.assigner = this.form.assigner.join(',')
|
|
- if (this.form.isAssigner){
|
|
|
|
- this.form.isAssigner='1';
|
|
|
|
|
|
+ if (this.form.isAssigner) {
|
|
|
|
+ this.form.isAssigner = '1';
|
|
}
|
|
}
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
updateMatrix(this.form).then(response => {
|
|
updateMatrix(this.form).then(response => {
|
|
@@ -431,7 +427,7 @@ export default {
|
|
setTable(tableData) {
|
|
setTable(tableData) {
|
|
// console.log(tableData)
|
|
// console.log(tableData)
|
|
let spanArr = [],
|
|
let spanArr = [],
|
|
- concat = 0;
|
|
|
|
|
|
+ concat = 0;
|
|
tableData.forEach((item, index) => {
|
|
tableData.forEach((item, index) => {
|
|
if (index === 0) {
|
|
if (index === 0) {
|
|
spanArr.push(1);
|
|
spanArr.push(1);
|