forked from xxhjsb/hbt-prevention-ui
feat:隐患流程相关bug
parent
969e3d2127
commit
6be98c6962
|
|
@ -227,7 +227,7 @@ export default class AnalEvaluationComponent extends Vue {
|
||||||
key: "name",
|
key: "name",
|
||||||
type: "text",
|
type: "text",
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "100%",
|
||||||
disable: true,
|
disable: true,
|
||||||
showError: false,
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -259,9 +259,9 @@ export default class AnalEvaluationComponent extends Vue {
|
||||||
{
|
{
|
||||||
name: "作业步骤描述",
|
name: "作业步骤描述",
|
||||||
key: "description",
|
key: "description",
|
||||||
type: "text",
|
type: "textarea",
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(100% - 20px)",
|
width: "100%",
|
||||||
disable: true,
|
disable: true,
|
||||||
showError: false,
|
showError: false,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export default class AreaService extends BaseService<any>{
|
||||||
}
|
}
|
||||||
// 查询列表
|
// 查询列表
|
||||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/risk/area/list';
|
const url = this.prefix.prevention+'/risk/area/analList';
|
||||||
return this.get(url,params,true)
|
return this.get(url,params,true)
|
||||||
}
|
}
|
||||||
// 批量删除
|
// 批量删除
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ export default class UnitService extends BaseService<any>{
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
public selectByPage(params: any,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectByPage(params: any,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/risk/unit/list';
|
const url = this.prefix.prevention+'/risk/unit/listAll';
|
||||||
return this.get(url,params,showLoading)
|
return this.get(url,params,showLoading)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
value: item.id
|
value: item.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.buildUpdateForm()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 加载单元列表
|
// 加载单元列表
|
||||||
|
|
@ -149,7 +148,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
value: item.id
|
value: item.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.buildUpdateForm()
|
const option = this.updateOptions.find(item => item.key === "unitId") as any;
|
||||||
|
option.datas = this.unitList
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -293,6 +293,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
require: true,
|
require: true,
|
||||||
expandLevel: Infinity,
|
expandLevel: Infinity,
|
||||||
showError: false,
|
showError: false,
|
||||||
|
clearable: true,
|
||||||
datas: this.$store.state.deptTreeList
|
datas: this.$store.state.deptTreeList
|
||||||
}, {
|
}, {
|
||||||
name: "整改人员",
|
name: "整改人员",
|
||||||
|
|
@ -321,6 +322,11 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
showError: false,
|
showError: false,
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() < moment(new Date()).subtract(1, 'day').toDate().getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
name: "问题描述",
|
name: "问题描述",
|
||||||
key: "description",
|
key: "description",
|
||||||
|
|
@ -477,6 +483,14 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
if (item && item.key === "verifyUserId") {
|
if (item && item.key === "verifyUserId") {
|
||||||
this.updateParams.verifyUserName = this.$store.getters.user_map[data]
|
this.updateParams.verifyUserName = this.$store.getters.user_map[data]
|
||||||
}
|
}
|
||||||
|
if (item && item.key === 'reformDeadline') {
|
||||||
|
const now = moment().format("YYYY-MM-DD HH");
|
||||||
|
if (now > data) {
|
||||||
|
this.$message.error("要求整改日期不能早于当前时间")
|
||||||
|
this.updateParams.reformDeadline = null;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -517,6 +531,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
} as any;
|
} as any;
|
||||||
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -533,7 +548,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
inspectUserName: this.account.nickName,
|
inspectUserName: this.account.nickName,
|
||||||
number: null,
|
number: null,
|
||||||
photo: null,
|
photo: null,
|
||||||
inspectTime: moment().format("YYYY-MM-DD HH:mm")
|
inspectTime: moment().format("YYYY-MM-DD HH:mm"),
|
||||||
|
dangerType: 4
|
||||||
}
|
}
|
||||||
if (!row) {
|
if (!row) {
|
||||||
this.tableService.getNumber().then(res => {
|
this.tableService.getNumber().then(res => {
|
||||||
|
|
@ -559,7 +575,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
}, res.data)
|
}, res.data)
|
||||||
this.updateParams.majorHazard = +this.updateParams.majorHazard
|
this.updateParams.majorHazard = +this.updateParams.majorHazard
|
||||||
this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
|
this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
|
||||||
|
|
||||||
// 地图定位
|
// 地图定位
|
||||||
this.center = [res.data.locationLng, res.data.locationLat];
|
this.center = [res.data.locationLng, res.data.locationLat];
|
||||||
this.buildUpdateForm()
|
this.buildUpdateForm()
|
||||||
|
|
@ -651,7 +666,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
}
|
}
|
||||||
|
|
||||||
public onPreview(file) {
|
public onPreview(file) {
|
||||||
console.log(file)
|
|
||||||
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
|
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
|
||||||
this.currentUrl = file.url;
|
this.currentUrl = file.url;
|
||||||
this.showFile = true;
|
this.showFile = true;
|
||||||
|
|
@ -669,8 +683,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
this.updateParams.resourceName = this.photoList.map(item => item.name).join(",")
|
this.updateParams.resourceName = this.photoList.map(item => item.name).join(",")
|
||||||
this.updateParams.resourceOtherId = this.fileList.map(item => item.id).join(",")
|
this.updateParams.resourceOtherId = this.fileList.map(item => item.id).join(",")
|
||||||
this.updateParams.resourceOtherName = this.fileList.map(item => item.name).join(",")
|
this.updateParams.resourceOtherName = this.fileList.map(item => item.name).join(",")
|
||||||
|
this.tableService.addOrUpdate(JSON.parse(JSON.stringify(this.updateParams)), !this.updateParams.id).then(res => {
|
||||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => {
|
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功");
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功");
|
||||||
if (isSubmit) {
|
if (isSubmit) {
|
||||||
this.startWorkFlow(res.data, [this.updateParams.reformUserId])
|
this.startWorkFlow(res.data, [this.updateParams.reformUserId])
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="common-content-box dis-flex flex-col flex-1">
|
<div class="common-content-box dis-flex flex-col flex-1">
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
||||||
:full-btn="false" @change="change" btn-position="end"></FormComponent>
|
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box flex-1">
|
<div class="table-box flex-1">
|
||||||
<div class="full" v-if="isManager">
|
<div class="full" v-if="isManager">
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
@click="showUpdateModel(scope.row,true)">查看</el-button>
|
@click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||||
<el-button type="text" v-if="isBase && !(isClap && scope.row.status)"
|
<el-button type="text" v-if="isBase && !(isClap && scope.row.status)"
|
||||||
@click="showUpdateModel(scope.row)">修改</el-button>
|
@click="showUpdateModel(scope.row)">修改</el-button>
|
||||||
<el-button type="text" v-if="isBase" @click="deleteData([scope.row.id])">删除</el-button>
|
<el-button type="text" v-if="isBase && !(isClap && scope.row.status)" @click="deleteData([scope.row.id])">删除</el-button>
|
||||||
<!-- <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">抄送</el-button>
|
<!-- <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">抄送</el-button>
|
||||||
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">移交</el-button> -->
|
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">移交</el-button> -->
|
||||||
<el-button type="text" v-if="isManager && params.type===4 && scope.row.status<5"
|
<el-button type="text" v-if="isManager && params.type===4 && scope.row.status<5"
|
||||||
|
|
|
||||||
|
|
@ -662,6 +662,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
} as any;
|
} as any;
|
||||||
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -426,6 +426,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
type: "select",
|
type: "select",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
|
require: true,
|
||||||
datas: this.$store.state.prevention_major_type,
|
datas: this.$store.state.prevention_major_type,
|
||||||
}, {
|
}, {
|
||||||
name: "属性分类",
|
name: "属性分类",
|
||||||
|
|
@ -517,19 +518,22 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
}, {
|
}, {
|
||||||
name: "治理资金",
|
name: "治理资金",
|
||||||
type: "number",
|
type: "number",
|
||||||
width: "35%",
|
width: "calc(50% - 20px)",
|
||||||
key: "executeMoney",
|
key: "executeMoney",
|
||||||
require: true,
|
require: true,
|
||||||
hide: this.updateParams.reformConfirmFlag === 0,
|
hide: this.updateParams.reformConfirmFlag === 0,
|
||||||
showError: false,
|
showError: false,
|
||||||
|
rules: [
|
||||||
|
{ pattern: /^[1-9]\d{0,7}(\.\d{1,3})?$/, message: '不超过八位的整数', },
|
||||||
|
],
|
||||||
unit: {
|
unit: {
|
||||||
name: "元",
|
name: "元",
|
||||||
type: "text"
|
type: "text"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
name: "",
|
name: "资金来源",
|
||||||
type: "textarea",
|
type: "textarea",
|
||||||
width: "calc(65% - 40px)",
|
width: "calc(50% - 20px)",
|
||||||
key: "executeMoneySource",
|
key: "executeMoneySource",
|
||||||
hide: this.updateParams.reformConfirmFlag === 0,
|
hide: this.updateParams.reformConfirmFlag === 0,
|
||||||
placeholder: "请输入资金来源"
|
placeholder: "请输入资金来源"
|
||||||
|
|
@ -549,6 +553,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
key: "realConfirmTime",
|
key: "realConfirmTime",
|
||||||
format: "yyyy-MM-dd HH:mm",
|
format: "yyyy-MM-dd HH:mm",
|
||||||
showError: false,
|
showError: false,
|
||||||
|
disable:true,
|
||||||
pickerOptions: this.getPickerOptions(this.updateParams.createTime),
|
pickerOptions: this.getPickerOptions(this.updateParams.createTime),
|
||||||
}]
|
}]
|
||||||
this.updateOptions3 = [{
|
this.updateOptions3 = [{
|
||||||
|
|
@ -777,6 +782,12 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.getTableCallback()
|
this.getTableCallback()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (item && item.key === 'executeMoney') {
|
||||||
|
this.updateParams.executeMoney = null;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.updateParams.executeMoney = +data.toFixed(2)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
if (item && item.key === "reformDeadline") {
|
if (item && item.key === "reformDeadline") {
|
||||||
const now = moment().format("YYYY-MM-DD HH");
|
const now = moment().format("YYYY-MM-DD HH");
|
||||||
if (now > data) {
|
if (now > data) {
|
||||||
|
|
@ -1053,7 +1064,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.updateParams.verifyResourceId = this.photoList2.map(item => item.id).join(",")
|
this.updateParams.verifyResourceId = this.photoList2.map(item => item.id).join(",")
|
||||||
this.updateParams.verifyResourceName = this.photoList2.map(item => item.name).join(",")
|
this.updateParams.verifyResourceName = this.photoList2.map(item => item.name).join(",")
|
||||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => {
|
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功" : "编辑成功");
|
this.$message.success(!this.updateParams.id ? "新增成功" : "提交成功");
|
||||||
if (!preStatus) {
|
if (!preStatus) {
|
||||||
if (isSubmit) {
|
if (isSubmit) {
|
||||||
this.startWorkFlow(this.updateParams.id || res.data, [this.updateParams.reformUserId])
|
this.startWorkFlow(this.updateParams.id || res.data, [this.updateParams.reformUserId])
|
||||||
|
|
@ -1167,17 +1178,17 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
}
|
}
|
||||||
|
|
||||||
public onRemove(file, fileList) {
|
public onRemove(file, fileList) {
|
||||||
this.photoList.splice(this.photoList.findIndex(item => item.id === file.response.data.id), 1)
|
this.photoList.splice(this.photoList.findIndex(item => item.id === file.id), 1)
|
||||||
this.updateParams.photo = this.photoList.length || null
|
this.updateParams.photo = this.photoList.length || null
|
||||||
}
|
}
|
||||||
public onRemove2(file, fileList) {
|
public onRemove2(file, fileList) {
|
||||||
this.fileList.splice(this.fileList.findIndex(item => item.id === file.response.data.id), 1)
|
this.fileList.splice(this.fileList.findIndex(item => item.id === file.id), 1)
|
||||||
}
|
}
|
||||||
public onRemove3(file, fileList) {
|
public onRemove3(file, fileList) {
|
||||||
this.fileList2.splice(this.fileList2.findIndex(item => item.id === file.response.data.id), 1)
|
this.fileList2.splice(this.fileList2.findIndex(item => item.id === file.id), 1)
|
||||||
}
|
}
|
||||||
public onRemove4(file, fileList) {
|
public onRemove4(file, fileList) {
|
||||||
this.photoList2.splice(this.photoList2.findIndex(item => item.id === file.response.data.id), 1)
|
this.photoList2.splice(this.photoList2.findIndex(item => item.id === file.id), 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
public onPreview(file) {
|
public onPreview(file) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<TableComponent v-if="isManager" :tableData="updateTableData" :tableColumn="updateTableColumn"
|
<TableComponent v-if="isManager" :tableData="updateTableData" :tableColumn="updateTableColumn"
|
||||||
@actionCallback="subCallback($event)" actionPosition="flex-start"
|
@actionCallback="subCallback($event)" actionPosition="flex-start"
|
||||||
:actions="!isReadonly?updateTableActions:[]" :showFooter="false" style="margin-bottom: 20px;">
|
:actions="!isReadonly?updateTableActions:[]" :showFooter="false" style="margin-bottom: 20px;">
|
||||||
<el-table ref="multipleTable" :data="updateParams.tableItems" tooltip-effect="dark" height="100%" border
|
<el-table ref="submultipleTable" :data="updateParams.tableItems" tooltip-effect="dark" height="100%" border
|
||||||
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
|
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
|
||||||
<el-table-column type="selection" fixed label="全选" width="40" v-if="!isReadonly">
|
<el-table-column type="selection" fixed label="全选" width="40" v-if="!isReadonly">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -80,9 +80,9 @@
|
||||||
|
|
||||||
|
|
||||||
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="!subUpdateParams.id?'新增':subIsReadonly?'详情':'编辑'"
|
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="!subUpdateParams.id?'新增':subIsReadonly?'详情':'编辑'"
|
||||||
:visible.sync="showSubUpdate" :before-close="handleClose">
|
:visible.sync="showSubUpdate" :before-close="handleClose" destroy-on-close>
|
||||||
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right"
|
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right"
|
||||||
:data.sync="subUpdateParams" @actionCallback="subCallback" :actions="updateActions" :full-btn="true"
|
:data.sync="subUpdateParams" @actionCallback="subCallback" :actions="subUpdateActions" :full-btn="true"
|
||||||
@change="subChange" btn-position="center">
|
@change="subChange" btn-position="center">
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -93,8 +93,7 @@
|
||||||
<TableComponent :tableData="updateTableData" :tableColumn="updateTableColumn"
|
<TableComponent :tableData="updateTableData" :tableColumn="updateTableColumn"
|
||||||
@pageNumberChange="loadRuleTable($event,'pageNum')" @pageSizeChange="loadRuleTable($event,'pageSize')"
|
@pageNumberChange="loadRuleTable($event,'pageNum')" @pageSizeChange="loadRuleTable($event,'pageSize')"
|
||||||
:showFooter="true">
|
:showFooter="true">
|
||||||
|
<el-table ref="checkMultipleTable" :data="updateTableData.datas" tooltip-effect="dark" max-height="600px" border
|
||||||
<el-table ref="multipleTable" :data="updateTableData.datas" tooltip-effect="dark" height="100%" border
|
|
||||||
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
|
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
|
||||||
<el-table-column type="selection" fixed label="全选" width="40px">
|
<el-table-column type="selection" fixed label="全选" width="40px">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ export default class RulesComponent extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
multiple: true,
|
multiple: true,
|
||||||
showError: false,
|
showError: false,
|
||||||
|
clearable: true,
|
||||||
datas: this.$store.state.prevention_dangrous_type
|
datas: this.$store.state.prevention_dangrous_type
|
||||||
}]
|
}]
|
||||||
this.updateActions = [{
|
this.updateActions = [{
|
||||||
|
|
@ -193,6 +194,7 @@ export default class RulesComponent extends BaseRecordComponent<any> {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
} as any;
|
} as any;
|
||||||
|
this.getTableData()
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 数据保存
|
* 数据保存
|
||||||
|
|
|
||||||
|
|
@ -107,45 +107,15 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
pageNum: 1
|
pageNum: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateActions = [{
|
public updateActions = [] as any;
|
||||||
name:"取消",
|
|
||||||
value:"cancel"
|
|
||||||
},{
|
|
||||||
name:"保存并继续添加",
|
|
||||||
value:"saveAndContinue",
|
|
||||||
type:"primary"
|
|
||||||
},{
|
|
||||||
name:"保存",
|
|
||||||
value:"save",
|
|
||||||
type:"primary"
|
|
||||||
}];
|
|
||||||
|
|
||||||
public subUpdateOptions = [{
|
public checkUpdateActions = [] as any;
|
||||||
name:"检查项目",
|
|
||||||
type:"text",
|
public subUpdateOptions = [] as any;
|
||||||
require:true,
|
|
||||||
showError:false,
|
|
||||||
width:"100%",
|
|
||||||
key:"name",
|
|
||||||
},{
|
|
||||||
name:"检查内容",
|
|
||||||
type:"textarea",
|
|
||||||
require:true,
|
|
||||||
width:"100%",
|
|
||||||
showError:false,
|
|
||||||
key:"content",
|
|
||||||
},{
|
|
||||||
name:"检查依据",
|
|
||||||
type:"textarea",
|
|
||||||
require:true,
|
|
||||||
width:"100%",
|
|
||||||
showError:false,
|
|
||||||
key:"reason",
|
|
||||||
}]
|
|
||||||
|
|
||||||
public subUpdateActions = [{
|
public subUpdateActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value:"cancelSub"
|
value: "cancel"
|
||||||
}, {
|
}, {
|
||||||
name: "确定",
|
name: "确定",
|
||||||
value: "saveSub",
|
value: "saveSub",
|
||||||
|
|
@ -250,6 +220,57 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.$store.state.prevention_dangrous_type
|
datas: this.$store.state.prevention_dangrous_type
|
||||||
}]
|
}]
|
||||||
|
this.updateActions = [{
|
||||||
|
name: "取消",
|
||||||
|
value: "cancel"
|
||||||
|
}, {
|
||||||
|
name: "保存并继续添加",
|
||||||
|
value: "saveAndContinue",
|
||||||
|
type: "primary",
|
||||||
|
hide: this.updateParams.id
|
||||||
|
}, {
|
||||||
|
name: "保存",
|
||||||
|
value: "save",
|
||||||
|
type: "primary"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
public subBuildUpdateForm() {
|
||||||
|
this.subUpdateOptions = [{
|
||||||
|
name: "检查项目",
|
||||||
|
type: "text",
|
||||||
|
require: true,
|
||||||
|
showError: false,
|
||||||
|
width: "100%",
|
||||||
|
key: "name",
|
||||||
|
}, {
|
||||||
|
name: "检查内容",
|
||||||
|
type: "textarea",
|
||||||
|
require: true,
|
||||||
|
width: "100%",
|
||||||
|
showError: false,
|
||||||
|
key: "content",
|
||||||
|
}, {
|
||||||
|
name: "检查依据",
|
||||||
|
type: "textarea",
|
||||||
|
require: true,
|
||||||
|
width: "100%",
|
||||||
|
showError: false,
|
||||||
|
key: "reason",
|
||||||
|
}]
|
||||||
|
this.checkUpdateActions = [{
|
||||||
|
name: "取消",
|
||||||
|
value: "cancel"
|
||||||
|
}, {
|
||||||
|
name: "保存并继续添加",
|
||||||
|
value: "saveAndContinue",
|
||||||
|
type: "primary",
|
||||||
|
hide: this.subUpdateParams.index
|
||||||
|
}, {
|
||||||
|
name: "保存",
|
||||||
|
value: "save",
|
||||||
|
type: "primary"
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载区域列表
|
// 加载区域列表
|
||||||
|
|
@ -261,7 +282,6 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
value: item.id
|
value: item.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.loadUnitData()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 加载单元列表
|
// 加载单元列表
|
||||||
|
|
@ -273,7 +293,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
value: item.id
|
value: item.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.buildUpdateForm()
|
const option = this.updateOptions.find(item => item.key === "units") as any;
|
||||||
|
option.datas = this.unitList
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,7 +311,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.tableColumn.push({ name: '单元名称', key: "units" });
|
this.tableColumn.push({ name: '单元名称', key: "units" });
|
||||||
this.tableColumn.push({ name: '对象名称', key: "targets" });
|
this.tableColumn.push({ name: '对象名称', key: "targets" });
|
||||||
this.tableColumn.push({ name: '适用部门', key: "depts" });
|
this.tableColumn.push({ name: '适用部门', key: "depts" });
|
||||||
this.tableColumn.push({name:'适用类型',key:"types",filters:this.$store.state.prevention_dangrous_type.map(item=>{
|
this.tableColumn.push({
|
||||||
|
name: '适用类型', key: "types", filters: this.$store.state.prevention_dangrous_type.map(item => {
|
||||||
return {
|
return {
|
||||||
text: item.name,
|
text: item.name,
|
||||||
value: item.name,
|
value: item.name,
|
||||||
|
|
@ -301,7 +323,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
return data.types.split(',').map(item => {
|
return data.types.split(',').map(item => {
|
||||||
return this.$store.getters.prevention_dangrous_type_map[item]
|
return this.$store.getters.prevention_dangrous_type_map[item]
|
||||||
}).join(",")
|
}).join(",")
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
this.tableColumn.push({ name: '编制人', key: "createName" });
|
this.tableColumn.push({ name: '编制人', key: "createName" });
|
||||||
this.tableColumn.push({ name: '编制时间', key: "createTime" });
|
this.tableColumn.push({ name: '编制时间', key: "createTime" });
|
||||||
this.updateTableColumn = [];
|
this.updateTableColumn = [];
|
||||||
|
|
@ -311,9 +334,11 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.updateTableColumn.push({ name: '检查内容', key: "content", showTip: true });
|
this.updateTableColumn.push({ name: '检查内容', key: "content", showTip: true });
|
||||||
this.updateTableColumn.push({ name: '检查依据', key: "reason", showTip: true });
|
this.updateTableColumn.push({ name: '检查依据', key: "reason", showTip: true });
|
||||||
if (this.showSubMutilUpdate) {
|
if (this.showSubMutilUpdate) {
|
||||||
this.updateTableColumn.push({name:'检查类型',key:"reason",render:(data)=>{
|
this.updateTableColumn.push({
|
||||||
|
name: '检查类型', key: "type", render: (data) => {
|
||||||
return this.$store.getters.prevention_dangrous_type_map[data.type]
|
return this.$store.getters.prevention_dangrous_type_map[data.type]
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -374,6 +399,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.showSubMutilUpdate = true;
|
this.showSubMutilUpdate = true;
|
||||||
this.buildTable()
|
this.buildTable()
|
||||||
this.clearSelect()
|
this.clearSelect()
|
||||||
|
this.loadRuleTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -390,6 +416,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
item.index = i + 1
|
item.index = i + 1
|
||||||
})
|
})
|
||||||
this.clearSelect()
|
this.clearSelect()
|
||||||
|
this.ruleParams = {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNum: 1
|
||||||
|
}
|
||||||
this.showSubMutilUpdate = false;
|
this.showSubMutilUpdate = false;
|
||||||
this.buildTable();
|
this.buildTable();
|
||||||
}
|
}
|
||||||
|
|
@ -421,6 +451,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
}
|
}
|
||||||
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
||||||
public showSubUpdateModel(row?, isRead?) {
|
public showSubUpdateModel(row?, isRead?) {
|
||||||
|
|
@ -429,6 +460,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (row) {
|
if (row) {
|
||||||
this.subUpdateParams = JSON.parse(JSON.stringify(row))
|
this.subUpdateParams = JSON.parse(JSON.stringify(row))
|
||||||
}
|
}
|
||||||
|
this.subBuildUpdateForm()
|
||||||
this.showSubUpdate = true;
|
this.showSubUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -438,11 +470,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.updateParams = { number: null, tableItems: [] } as any;
|
this.updateParams = { number: null, tableItems: [] } as any;
|
||||||
this.isReadonly = !!isRead;
|
this.isReadonly = !!isRead;
|
||||||
this.clearSelect()
|
this.clearSelect()
|
||||||
|
|
||||||
this.buildUpdateForm();
|
|
||||||
if (!row) {
|
if (!row) {
|
||||||
this.currentId = -1;
|
this.currentId = -1;
|
||||||
this.getNumber();
|
this.getNumber();
|
||||||
|
this.buildUpdateForm();
|
||||||
this.showUpdate = true;
|
this.showUpdate = true;
|
||||||
} else {
|
} else {
|
||||||
this.currentId = row.id;
|
this.currentId = row.id;
|
||||||
|
|
@ -457,9 +488,13 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.updateParams.tableItems.forEach((item, i) => {
|
this.updateParams.tableItems.forEach((item, i) => {
|
||||||
item.index = i + 1
|
item.index = i + 1
|
||||||
})
|
})
|
||||||
|
this.buildUpdateForm();
|
||||||
this.showUpdate = true;
|
this.showUpdate = true;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public doSubSave(goOn?) {
|
public doSubSave(goOn?) {
|
||||||
if (!this.subUpdateParams.index) {
|
if (!this.subUpdateParams.index) {
|
||||||
|
|
@ -473,7 +508,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
item.index = i + 1
|
item.index = i + 1
|
||||||
})
|
})
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
this.showSubUpdate = !!goOn
|
this.showSubUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public doSubDelete(indexs) {
|
public doSubDelete(indexs) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<TableComponent :tableData="updateParams.details" :tableColumn="subTableColumn"
|
<TableComponent :tableData="updateParams.details" :tableColumn="subTableColumn"
|
||||||
@actionCallback="subCallback($event)" :actions="isReadonly ? [] :tableActions"
|
@actionCallback="subCallback($event)" :actions="isReadonly ? [] :tableActions"
|
||||||
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
||||||
<el-table ref="multipleTable" :data="updateParams.details" tooltip-effect="dark" max-height="500" border
|
<el-table ref="subMultipleTable" :data="updateParams.details" tooltip-effect="dark" max-height="500" border
|
||||||
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
||||||
<el-table-column v-if="!isReadonly" type="selection" fixed label="全选" width="40">
|
<el-table-column v-if="!isReadonly" type="selection" fixed label="全选" width="40">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -82,8 +82,8 @@
|
||||||
:title="subIsReadonly?'详情':subUpdateParams.index||subUpdateParams.id ?'编辑': '新增'" :visible.sync="subShowUpdate"
|
:title="subIsReadonly?'详情':subUpdateParams.index||subUpdateParams.id ?'编辑': '新增'" :visible.sync="subShowUpdate"
|
||||||
width="952px" destroy-on-close>
|
width="952px" destroy-on-close>
|
||||||
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
||||||
@actionCallback="triCallback" :isReadonly="subIsReadonly" :actions="updateActions"
|
@actionCallback="triCallback" :isReadonly="subIsReadonly" :actions="subUpdateActions" :full-btn="true" @change="changes"
|
||||||
:full-btn="true" btnPosition="center">
|
btnPosition="center">
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -120,6 +120,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public updateActions = [] as any;
|
public updateActions = [] as any;
|
||||||
|
public subUpdateActions = [] as any;
|
||||||
|
|
||||||
public rewardsType = [{
|
public rewardsType = [{
|
||||||
name: "不涉及",
|
name: "不涉及",
|
||||||
|
|
@ -178,6 +179,22 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
showError: false,
|
showError: false,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
this.updateActions = [{
|
||||||
|
name: "取消",
|
||||||
|
value: "cancel"
|
||||||
|
}, {
|
||||||
|
name: "保存并继续添加",
|
||||||
|
value: "saveAndContinue",
|
||||||
|
type: "primary",
|
||||||
|
hide: this.updateParams.id
|
||||||
|
}, {
|
||||||
|
name: "保存",
|
||||||
|
value: "save",
|
||||||
|
type: "primary"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
public buildSubUpdateForm() {
|
||||||
this.subUpdateOptions = [{
|
this.subUpdateOptions = [{
|
||||||
name: "奖惩日期",
|
name: "奖惩日期",
|
||||||
type: "date",
|
type: "date",
|
||||||
|
|
@ -202,6 +219,10 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
|
hide: !(this.subUpdateParams.type && this.subUpdateParams.type !== 1),
|
||||||
|
rules: [
|
||||||
|
{ pattern: /^[1-9]\d{0,7}(\.\d{1,3})?$/, message: '不超过八位的整数', },
|
||||||
|
]
|
||||||
}, {
|
}, {
|
||||||
name: "奖惩事由",
|
name: "奖惩事由",
|
||||||
type: "textarea",
|
type: "textarea",
|
||||||
|
|
@ -229,14 +250,14 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
expandLevel: Infinity,
|
expandLevel: Infinity,
|
||||||
datas: this.$store.state.deptTreeList
|
datas: this.$store.state.deptTreeList
|
||||||
},];
|
},];
|
||||||
this.updateActions = [{
|
this.subUpdateActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value: "cancel"
|
value: "cancel"
|
||||||
}, {
|
}, {
|
||||||
name: "保存并继续添加",
|
name: "保存并继续添加",
|
||||||
value: "saveAndContinue",
|
value: "saveAndContinue",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
hide: this.updateParams.id
|
hide: this.subUpdateParams.index
|
||||||
}, {
|
}, {
|
||||||
name: "保存",
|
name: "保存",
|
||||||
value: "save",
|
value: "save",
|
||||||
|
|
@ -266,6 +287,22 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (item && item.key === 'type') {
|
||||||
|
if (data === 1) {
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "money") as any;
|
||||||
|
option.hide = true;
|
||||||
|
this.subUpdateParams.money = null
|
||||||
|
} else {
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "money") as any;
|
||||||
|
option.hide = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item && item.key === 'money') {
|
||||||
|
this.subUpdateParams.money = null;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.subUpdateParams.money = +data.toFixed(2)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
|
|
@ -375,7 +412,6 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public toggleAll() {
|
public toggleAll() {
|
||||||
|
|
||||||
this.tableData.datas.forEach((item, index) => {
|
this.tableData.datas.forEach((item, index) => {
|
||||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||||
})
|
})
|
||||||
|
|
@ -410,7 +446,6 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
this.isReadonly = false
|
this.isReadonly = false
|
||||||
this.subIsReadonly = false
|
this.subIsReadonly = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tableService.getListDetail({ id: row.id }).then((res: any) => {
|
this.tableService.getListDetail({ id: row.id }).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.updateParams = res.data
|
this.updateParams = res.data
|
||||||
|
|
@ -431,7 +466,8 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
if (data.value === "add") {
|
if (data.value === "add") {
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
this.subIsReadonly = false;
|
this.subIsReadonly = false;
|
||||||
this.subShowUpdate = true
|
this.buildSubUpdateForm()
|
||||||
|
this.subShowUpdate = true;
|
||||||
} else if (data.value === "cancel") {
|
} else if (data.value === "cancel") {
|
||||||
this.showUpdate = false
|
this.showUpdate = false
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
|
|
@ -441,6 +477,10 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
this.deleteSubData(this.subSelectData.map((itm: any) => itm.index - 1))
|
this.deleteSubData(this.subSelectData.map((itm: any) => itm.index - 1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 保存数据
|
||||||
|
* @param goOn
|
||||||
|
*/
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
|
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
|
|
@ -455,12 +495,15 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public triCallback(data) {
|
public triCallback(data) {
|
||||||
if (data.value === "cancel") {
|
if (data.value === "cancel") {
|
||||||
this.subShowUpdate = false
|
this.subShowUpdate = false;
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
this.doSubSave(data.value !== "save")
|
this.doSubSave(data.value !== "save")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 新增奖惩记录
|
||||||
|
* @param goOn
|
||||||
|
*/
|
||||||
public doSubSave(goOn) {
|
public doSubSave(goOn) {
|
||||||
// 如果是新增步骤
|
// 如果是新增步骤
|
||||||
if (this.subShowUpdate) {
|
if (this.subShowUpdate) {
|
||||||
|
|
@ -474,27 +517,31 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
this.updateParams.details.splice(this.updateParams.details.findIndex(item => item.index === this.subUpdateParams.index), 1, this.subUpdateParams)
|
this.updateParams.details.splice(this.updateParams.details.findIndex(item => item.index === this.subUpdateParams.index), 1, this.subUpdateParams)
|
||||||
}
|
}
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
|
this.buildSubUpdateForm()
|
||||||
this.subShowUpdate = !!goOn;
|
this.subShowUpdate = !!goOn;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//查看或者修改
|
/**
|
||||||
public showSubModal(row, isReadonly) {
|
* 奖惩记录查看或者修改
|
||||||
if (isReadonly) {
|
* @param row 当前行数据
|
||||||
this.subIsReadonly = true
|
* @param isReadonly 是否是查看
|
||||||
|
*/
|
||||||
|
public showSubModal(row: any, isReadonly = false) {
|
||||||
|
this.subIsReadonly = isReadonly
|
||||||
this.subUpdateParams = Object.assign({
|
this.subUpdateParams = Object.assign({
|
||||||
typeName: this.rewardsTypeName[row.type]
|
typeName: this.rewardsTypeName[row.type]
|
||||||
}, row)
|
}, row)
|
||||||
} else {
|
|
||||||
this.subIsReadonly = false
|
|
||||||
this.subUpdateParams = row
|
|
||||||
}
|
|
||||||
this.subShowUpdate = true
|
|
||||||
this.buildUpdateForm()
|
|
||||||
}
|
|
||||||
|
|
||||||
//删除成员
|
this.buildSubUpdateForm()
|
||||||
|
this.subShowUpdate = true
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除奖惩记录
|
||||||
|
* @param indexs
|
||||||
|
*/
|
||||||
public deleteSubData(indexs) {
|
public deleteSubData(indexs) {
|
||||||
this.$confirm('确认删除所选数据', '确认数据', {
|
this.$confirm('确认删除所选数据', '确认数据', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
<el-input size="mini" type="number" min="0" :max="scope.row.score"
|
<el-input size="mini" type="number" min="0" :max="scope.row.score"
|
||||||
v-model="scope.row.deductPoints" v-if="scope.row.pointFlag"
|
v-model="scope.row.deductPoints" v-if="scope.row.pointFlag"
|
||||||
@blur="inputClick(scope.row)" v-focus
|
@blur="inputClick(scope.row)" v-focus="true" ref="score"
|
||||||
@input="pointInput($event,scope.row,items)" @keyup.native="proving($event)"
|
@input="pointInput($event,scope.row,items)" @keyup.native="proving($event)"
|
||||||
oninput="if(isNaN(value)) { value = parseFloat(value) } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+2)}"></el-input>
|
oninput="if(isNaN(value)) { value = parseFloat(value) } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+2)}"></el-input>
|
||||||
<span v-if="!scope.row.pointFlag">{{scope.row.deductPoints}}</span>
|
<span v-if="!scope.row.pointFlag">{{scope.row.deductPoints}}</span>
|
||||||
|
|
@ -104,10 +104,12 @@
|
||||||
<el-table-column prop="record" label="评估记录" :show-overflow-tooltip="true">
|
<el-table-column prop="record" label="评估记录" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input size="mini" type="textarea" placeholder="点击输入评估记录" v-model="scope.row.record"
|
<el-input size="mini" type="textarea" placeholder="点击输入评估记录" v-model="scope.row.record"
|
||||||
v-if="scope.row.recordFlag" @blur="inputClick(scope.row)" v-focus></el-input>
|
v-if="scope.row.recordFlag" ref="record" @blur="inputClick(scope.row)"
|
||||||
|
v-focus="true"></el-input>
|
||||||
<span
|
<span
|
||||||
style="font-size: 14px;font-weight: 400;color: rgba(0,0,0,0.3) ;line-height: 20px;"
|
style="font-size: 14px;font-weight: 400;color: rgba(0,0,0,0.3) ;line-height: 20px;"
|
||||||
v-if="!scope.row.recordFlag && !scope.row.record">{{isReadonly?'--': '点击输入评估记录'}}</span>
|
v-if="!scope.row.recordFlag && !scope.row.record">{{isReadonly?'--':
|
||||||
|
'点击输入评估记录'}}</span>
|
||||||
<span v-if="!scope.row.recordFlag &&scope.row.record ">
|
<span v-if="!scope.row.recordFlag &&scope.row.record ">
|
||||||
{{scope.row.record}}
|
{{scope.row.record}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,14 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
} else if (data.value === "delete") {
|
} else if (data.value === "delete") {
|
||||||
this.deleteData(this.selectData.map((item: any) => item.id))
|
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||||
} else if (data.value === 'add') {
|
} else if (data.value === 'add') {
|
||||||
|
//添加
|
||||||
|
this.addUpdateMethod();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 添加按钮操作
|
||||||
|
*/
|
||||||
|
public addUpdateMethod() {
|
||||||
this.estimateStandard = [] as any;
|
this.estimateStandard = [] as any;
|
||||||
this.checkReject = [] as any;
|
this.checkReject = [] as any;
|
||||||
this.total = 10;
|
this.total = 10;
|
||||||
|
|
@ -255,16 +263,17 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
reviewerId: this.account.userId,
|
reviewerId: this.account.userId,
|
||||||
reviewTime: moment().format('YYYY-MM-DD'),
|
reviewTime: moment().format('YYYY-MM-DD'),
|
||||||
} as any;
|
} as any;
|
||||||
const tmpStandard = JSON.parse(JSON.stringify(Standard))
|
const tmpStandard = JSON.parse(JSON.stringify(Standard));
|
||||||
this.estimateStandard = tmpStandard
|
this.estimateStandard = tmpStandard;
|
||||||
const tmpStandardContent = JSON.parse(JSON.stringify(StandardContent))
|
const tmpStandardContent = JSON.parse(JSON.stringify(StandardContent));
|
||||||
this.StandardDetails = tmpStandardContent
|
this.StandardDetails = tmpStandardContent;
|
||||||
this.showUpdate = true
|
this.isReadonly = false;
|
||||||
this.isReadonly = false
|
this.buildUpdateForm();
|
||||||
this.fileList = [] as any;
|
//清除附件缓存数据
|
||||||
this.buildUpdateForm()
|
this.clearFileListMethod();
|
||||||
}
|
this.showUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分页数据
|
// 分页数据
|
||||||
public getTableData() {
|
public getTableData() {
|
||||||
this.tableService.selectByPage(this.params).then(res => {
|
this.tableService.selectByPage(this.params).then(res => {
|
||||||
|
|
@ -282,6 +291,8 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -363,26 +374,23 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
// 新增清单
|
//无否决项 判断自评项是否均已填写
|
||||||
if (this.fileList.length > 0) {
|
if (this.checkReject.length === 0) {
|
||||||
let resourceId = this.fileList.map((item) => {
|
let tips: any = false;
|
||||||
return item.id
|
this.estimateStandard.forEach((item: any) => {
|
||||||
})
|
item.tableData.forEach((dataitem: any) => {
|
||||||
let resourceName = this.fileList.map((item) => {
|
if (dataitem.deductPoints === '--') {
|
||||||
return item.name
|
tips = true
|
||||||
})
|
|
||||||
this.updateParams.resourceId = resourceId.join(",")
|
|
||||||
this.updateParams.resourceName = resourceName.join(",")
|
|
||||||
}
|
}
|
||||||
let tmpContent = {} as any;
|
})
|
||||||
tmpContent.content = this.estimateStandard;
|
})
|
||||||
tmpContent.checkReject = this.checkReject;
|
if (tips === true) {
|
||||||
tmpContent.total = this.total;
|
this.$message.warning('您有自评项未填写!!')
|
||||||
tmpContent.level = this.updateParams.level;
|
return
|
||||||
this.updateParams.content = JSON.stringify(tmpContent)
|
}
|
||||||
this.updateParams.scorePoints = this.total
|
}
|
||||||
this.updateParams.deductPoints = 110 - this.total
|
//整理传参数据
|
||||||
this.updateParams.reviewerName = this.$store.getters.user_map[this.updateParams.reviewerId]
|
this.reorganizeParamsDataMethod();
|
||||||
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
|
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
//保存清空
|
//保存清空
|
||||||
|
|
@ -402,6 +410,30 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 整理传参数据
|
||||||
|
*/
|
||||||
|
public reorganizeParamsDataMethod() {
|
||||||
|
if (this.fileList.length > 0) {
|
||||||
|
let resourceId = this.fileList.map((item) => {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
let resourceName = this.fileList.map((item) => {
|
||||||
|
return item.name;
|
||||||
|
});
|
||||||
|
this.updateParams.resourceId = resourceId.join(",");
|
||||||
|
this.updateParams.resourceName = resourceName.join(",");
|
||||||
|
}
|
||||||
|
let tmpContent = {} as any;
|
||||||
|
tmpContent.content = this.estimateStandard;
|
||||||
|
tmpContent.checkReject = this.checkReject;
|
||||||
|
tmpContent.total = this.total;
|
||||||
|
tmpContent.level = this.updateParams.level;
|
||||||
|
this.updateParams.content = JSON.stringify(tmpContent);
|
||||||
|
this.updateParams.scorePoints = this.total;
|
||||||
|
this.updateParams.deductPoints = 110 - this.total;
|
||||||
|
this.updateParams.reviewerName = this.$store.getters.user_map[this.updateParams.reviewerId];
|
||||||
|
}
|
||||||
|
|
||||||
public showModal(row, isReadonly) {
|
public showModal(row, isReadonly) {
|
||||||
if (isReadonly) {
|
if (isReadonly) {
|
||||||
|
|
@ -458,10 +490,16 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
public cellClick(row, column) {
|
public cellClick(row, column) {
|
||||||
if (this.isReadonly === false) {
|
if (this.isReadonly === false) {
|
||||||
if (column.label === '扣分') {
|
if (column.label === '扣分') {
|
||||||
row.pointFlag = true
|
row.pointFlag = true;
|
||||||
this.clickPointFlag = true
|
this.clickPointFlag = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
(this.$refs.score as any)[0].focus();
|
||||||
|
})
|
||||||
} else if (column.label === '评估记录') {
|
} else if (column.label === '评估记录') {
|
||||||
row.recordFlag = true
|
row.recordFlag = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
(this.$refs.record as any)[0].focus();
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -490,7 +528,12 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取输入焦点
|
||||||
|
* @param data
|
||||||
|
* @param row
|
||||||
|
* @param items
|
||||||
|
*/
|
||||||
public pointInput(data, row, items) {
|
public pointInput(data, row, items) {
|
||||||
// 过滤0后面接数值
|
// 过滤0后面接数值
|
||||||
if (data.replace(/^0+(\d)/, "$1")) {
|
if (data.replace(/^0+(\d)/, "$1")) {
|
||||||
|
|
@ -565,9 +608,6 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//预览附件
|
//预览附件
|
||||||
public previewFile(url, file) {
|
public previewFile(url, file) {
|
||||||
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
|
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
|
||||||
|
|
@ -602,6 +642,15 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除附件数据
|
||||||
|
*/
|
||||||
|
public clearFileListMethod() {
|
||||||
|
this.fileList = [];
|
||||||
|
const option = this.updateOptions.find(item => item.key === "resourceId") as any;
|
||||||
|
option.fileList = [];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,11 @@
|
||||||
:label="item.name" :width="item.width" :key="item.key">
|
:label="item.name" :width="item.width" :key="item.key">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" fixed="right" width="200" v-if="!isReadonly">
|
<el-table-column label="操作" fixed="right" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="showSubmodal(scope.row,true)">查看</el-button>
|
<el-button type="text" @click="showSubmodal(scope.row,true)">查看</el-button>
|
||||||
<el-button type="text" @click="showSubmodal(scope.row)">修改</el-button>
|
<el-button type="text" v-if="!isReadonly" @click="showSubmodal(scope.row)">修改</el-button>
|
||||||
<el-button type="text" @click="deleteProData([scope.row.index - 1])">删除</el-button>
|
<el-button type="text" v-if="!isReadonly" @click="deleteProData([scope.row.index - 1])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false"
|
<el-dialog :close-on-click-modal="false"
|
||||||
:title="subIsReadonly?'详情':subUpdateParams.index||subUpdateParams.id ?'编辑': '新增'" :visible.sync="subShowUpdate"
|
:title="subIsReadonly?'详情':subUpdateParams.index||subUpdateParams.id ?'编辑': '新增'" :visible.sync="subShowUpdate"
|
||||||
width="952px" destroy-on-close>
|
width="952px" :before-close="handleClose" destroy-on-close>
|
||||||
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
||||||
@actionCallback="triCallback" :isReadonly="subIsReadonly" @change="changes" :actions="updateActions"
|
@actionCallback="triCallback" :isReadonly="subIsReadonly" @change="changes" :actions="updateActions"
|
||||||
:full-btn="true" btnPosition="center" :labelWidth="labelWidth">
|
:full-btn="true" btnPosition="center" :labelWidth="labelWidth">
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,8 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
this.updateParams = {} as any;
|
this.updateParams = {} as any;
|
||||||
this.setpsOptions = [] as any;
|
this.setpsOptions = [] as any;
|
||||||
this.isReadonly = false;
|
this.isReadonly = false;
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
this.getNumber()
|
this.getNumber()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -414,6 +415,7 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
} as any;
|
} as any;
|
||||||
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
||||||
public showUpdateModel(id) {
|
public showUpdateModel(id) {
|
||||||
|
|
@ -422,6 +424,8 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -477,7 +481,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public subCallback(data) {
|
public subCallback(data) {
|
||||||
if (data.value === "cancel") {
|
if (data.value === "cancel") {
|
||||||
this.showUpdate = false
|
this.showUpdate = false;
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
this.doSave(data.value !== "save")
|
this.doSave(data.value !== "save")
|
||||||
}
|
}
|
||||||
|
|
@ -544,7 +550,8 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
this.updateParams = {} as any
|
this.updateParams = {} as any
|
||||||
this.showUpdate = !!goOn;
|
this.showUpdate = !!goOn;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
if (goOn === true) {
|
if (goOn === true) {
|
||||||
this.getNumber()
|
this.getNumber()
|
||||||
}
|
}
|
||||||
|
|
@ -599,6 +606,16 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除附件数据
|
||||||
|
*/
|
||||||
|
public clearFileListMethod() {
|
||||||
|
this.fileList = [];
|
||||||
|
const option = this.updateStepsOptions.find(item => item.key === "resourceId") as any;
|
||||||
|
option.fileList = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../common.component.scss"></style>
|
<style lang="scss" scoped src="../common.component.scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
this.buildUpdateForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -284,7 +285,9 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
||||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.buildUpdateForm()
|
// this.buildUpdateForm()
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "areaId") as any;
|
||||||
|
option.datas = this.areaList;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 加载单元列表
|
// 加载单元列表
|
||||||
|
|
@ -300,7 +303,9 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
||||||
userName: item.chargeUserName,
|
userName: item.chargeUserName,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.buildUpdateForm()
|
// this.buildUpdateForm()
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "unitId") as any;
|
||||||
|
option.datas = this.unitList;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -407,15 +412,17 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
this.subShowUpdate = false;
|
this.subShowUpdate = false;
|
||||||
|
//清除附件数据
|
||||||
|
this.clearFileListMethod();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public toggleAll() {
|
public toggleAll() {
|
||||||
|
|
||||||
this.tableData.datas.forEach((item, index) => {
|
this.tableData.datas.forEach((item, index) => {
|
||||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public selectAll() {
|
public selectAll() {
|
||||||
if (!this.selectData.length) {
|
if (!this.selectData.length) {
|
||||||
this.toggleAll()
|
this.toggleAll()
|
||||||
|
|
@ -468,10 +475,20 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
||||||
public triCallback(data) {
|
public triCallback(data) {
|
||||||
if (data.value === "cancel") {
|
if (data.value === "cancel") {
|
||||||
this.subShowUpdate = false
|
this.subShowUpdate = false
|
||||||
|
//清除附件数据
|
||||||
|
this.clearFileListMethod();
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
this.doSave(data.value !== "save")
|
this.doSave(data.value !== "save")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 清除附件数据
|
||||||
|
*/
|
||||||
|
public clearFileListMethod() {
|
||||||
|
this.fileList = [];
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "resourceId") as any;
|
||||||
|
option.fileList = [];
|
||||||
|
}
|
||||||
|
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
// 新增清单
|
// 新增清单
|
||||||
|
|
@ -492,7 +509,8 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
||||||
this.subUpdateParams = {} as any
|
this.subUpdateParams = {} as any
|
||||||
this.subShowUpdate = !!goOn;
|
this.subShowUpdate = !!goOn;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
|
//清除文件缓存
|
||||||
|
this.clearFileListMethod()
|
||||||
if (goOn === true) {
|
if (goOn === true) {
|
||||||
this.getNumber()
|
this.getNumber()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -301,6 +301,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
this.subIsReadonly = false;
|
this.subIsReadonly = false;
|
||||||
this.fileList = [] as any;
|
this.fileList = [] as any;
|
||||||
|
//清除文件缓存
|
||||||
|
this.clearFileListMethod()
|
||||||
this.getNumber()
|
this.getNumber()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -340,6 +342,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
this.subShowUpdate = false;
|
this.subShowUpdate = false;
|
||||||
|
//清除文件缓存
|
||||||
|
this.clearFileListMethod()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -399,7 +403,9 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public triCallback(data) {
|
public triCallback(data) {
|
||||||
if (data.value === "cancel") {
|
if (data.value === "cancel") {
|
||||||
this.subShowUpdate = false
|
this.subShowUpdate = false;
|
||||||
|
//清除文件缓存
|
||||||
|
this.clearFileListMethod()
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
this.doSave(data.value !== "save")
|
this.doSave(data.value !== "save")
|
||||||
}
|
}
|
||||||
|
|
@ -427,7 +433,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
||||||
this.subUpdateParams = {} as any
|
this.subUpdateParams = {} as any
|
||||||
this.subShowUpdate = !!goOn;
|
this.subShowUpdate = !!goOn;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
|
//清除文件缓存
|
||||||
|
this.clearFileListMethod()
|
||||||
if (goOn === true) {
|
if (goOn === true) {
|
||||||
this.getNumber()
|
this.getNumber()
|
||||||
}
|
}
|
||||||
|
|
@ -512,7 +519,11 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//下载附件
|
/**
|
||||||
|
* 下载附件
|
||||||
|
* @param url 下载url
|
||||||
|
* @param file 文件信息
|
||||||
|
*/
|
||||||
public downLoadFile(url, file) {
|
public downLoadFile(url, file) {
|
||||||
let DownUrl = url;
|
let DownUrl = url;
|
||||||
fetch(DownUrl)
|
fetch(DownUrl)
|
||||||
|
|
@ -535,6 +546,15 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
||||||
window.URL.revokeObjectURL(href); // 释放掉blob对象
|
window.URL.revokeObjectURL(href); // 释放掉blob对象
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除附件数据
|
||||||
|
*/
|
||||||
|
public clearFileListMethod() {
|
||||||
|
this.fileList = [];
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "resourceId") as any;
|
||||||
|
option.fileList = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../common.component.scss"></style>
|
<style lang="scss" scoped src="../common.component.scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
<TableComponent :tableData="updateParams.members" :tableColumn="subTableColumn"
|
<TableComponent :tableData="updateParams.members" :tableColumn="subTableColumn"
|
||||||
@actionCallback="subCallback($event)" :actions="isReadonly ? []:tableActions"
|
@actionCallback="subCallback($event)" :actions="isReadonly ? []:tableActions"
|
||||||
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
||||||
<el-table ref="multipleTable" :data="updateParams.members" tooltip-effect="dark" max-height="500" border
|
<el-table ref="subMultipleTable" :data="updateParams.members" tooltip-effect="dark" max-height="500" border
|
||||||
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
||||||
<el-table-column v-if="!isReadonly" type="selection" fixed label="全选" width="40">
|
<el-table-column v-if="!isReadonly" type="selection" fixed label="全选" width="40">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
:before-close="handleTableClose" destroy-on-close>
|
:before-close="handleTableClose" destroy-on-close>
|
||||||
<TableComponent :tableData="currentDetailsTableData" :tableColumn="subTableColumn" :showFooter="false"
|
<TableComponent :tableData="currentDetailsTableData" :tableColumn="subTableColumn" :showFooter="false"
|
||||||
style="margin-bottom: 20px;">
|
style="margin-bottom: 20px;">
|
||||||
<el-table ref="multipleTable" :data="currentDetailsTableData.datas" tooltip-effect="dark" height="250"
|
<el-table ref="subMultipleTable" :data="currentDetailsTableData.datas" tooltip-effect="dark" height="250"
|
||||||
border style="width: 100%">
|
border style="width: 100%">
|
||||||
<template v-for="item in subTableColumn">
|
<template v-for="item in subTableColumn">
|
||||||
<el-table-column :prop="item.key" :show-overflow-tooltip="item.showTip" :label="item.name"
|
<el-table-column :prop="item.key" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,19 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
showError: false,
|
showError: false,
|
||||||
},]
|
},]
|
||||||
|
this.subUpdateActions = [{
|
||||||
|
name: "取消",
|
||||||
|
value: "cancel"
|
||||||
|
}, {
|
||||||
|
name: "保存并继续添加",
|
||||||
|
value: "saveAndContinue",
|
||||||
|
type: "primary",
|
||||||
|
hide: this.subUpdateParams.index
|
||||||
|
}, {
|
||||||
|
name: "保存",
|
||||||
|
value: "save",
|
||||||
|
type: "primary"
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -343,7 +356,8 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
} as any;
|
} as any;
|
||||||
this.fileList = [] as any;
|
this.fileList = [] as any;
|
||||||
this.getFormNumber()
|
this.getFormNumber()
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//获取机构编号
|
//获取机构编号
|
||||||
|
|
@ -385,7 +399,6 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
this.updateParams.resourceId = resourceId.join(",")
|
this.updateParams.resourceId = resourceId.join(",")
|
||||||
this.updateParams.resourceName = resourceName.join(",")
|
this.updateParams.resourceName = resourceName.join(",")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
this.updateParams.chargeUserName = this.$store.getters.user_map[this.updateParams.chargeUserId];
|
this.updateParams.chargeUserName = this.$store.getters.user_map[this.updateParams.chargeUserId];
|
||||||
this.updateParams.approveUserName = this.$store.getters.user_map[this.updateParams.approveUserId];
|
this.updateParams.approveUserName = this.$store.getters.user_map[this.updateParams.approveUserId];
|
||||||
|
|
@ -398,7 +411,8 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
} as any
|
} as any
|
||||||
this.showUpdate = !!goOn;
|
this.showUpdate = !!goOn;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
this.fileList = [];
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
if (goOn === true) {
|
if (goOn === true) {
|
||||||
this.getFormNumber()
|
this.getFormNumber()
|
||||||
}
|
}
|
||||||
|
|
@ -411,6 +425,8 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -419,6 +435,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public selectAll() {
|
public selectAll() {
|
||||||
if (!this.selectData.length) {
|
if (!this.selectData.length) {
|
||||||
this.toggleAll()
|
this.toggleAll()
|
||||||
|
|
@ -548,11 +565,13 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public subCallback(data) {
|
public subCallback(data) {
|
||||||
if (data.value === "add") {
|
if (data.value === "add") {
|
||||||
this.buildSubForm()
|
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
|
this.buildSubForm()
|
||||||
this.subShowUpdate = true
|
this.subShowUpdate = true
|
||||||
} else if (data.value === "cancel") {
|
} else if (data.value === "cancel") {
|
||||||
this.showUpdate = false
|
this.showUpdate = false;
|
||||||
|
//清除附件缓存数据
|
||||||
|
this.clearFileListMethod()
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
this.doSave(data.value !== "save")
|
this.doSave(data.value !== "save")
|
||||||
} else if (data && data.value === 'delete') {
|
} else if (data && data.value === 'delete') {
|
||||||
|
|
@ -640,7 +659,11 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//下载附件
|
/**
|
||||||
|
* 下载附件
|
||||||
|
* @param url 下载url
|
||||||
|
* @param file 文件信息
|
||||||
|
*/
|
||||||
public downLoadFile(url, file) {
|
public downLoadFile(url, file) {
|
||||||
let DownUrl = url;
|
let DownUrl = url;
|
||||||
fetch(DownUrl)
|
fetch(DownUrl)
|
||||||
|
|
@ -663,6 +686,14 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
||||||
window.URL.revokeObjectURL(href); // 释放掉blob对象
|
window.URL.revokeObjectURL(href); // 释放掉blob对象
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 清除附件数据
|
||||||
|
*/
|
||||||
|
public clearFileListMethod() {
|
||||||
|
this.fileList = [];
|
||||||
|
const option = this.updateOptions.find(item => item.key === "resourceId") as any;
|
||||||
|
option.fileList = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../common.component.scss"></style>
|
<style lang="scss" scoped src="../common.component.scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
this.updateActions = [{
|
this.subUpdateActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value: "cancel"
|
value: "cancel"
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -256,7 +256,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ export default class Programme extends BaseRecordComponent<any> {
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
this.updateActions = [{
|
this.subUpdateActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value: "cancel"
|
value: "cancel"
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -383,15 +383,19 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
||||||
*/
|
*/
|
||||||
public durationChange(data: any, item: any) {
|
public durationChange(data: any, item: any) {
|
||||||
if (item && item.key === 'duration') {
|
if (item && item.key === 'duration') {
|
||||||
this.updateParams.duration = null;
|
this.$set(this.updateParams, item.key, null);
|
||||||
|
setTimeout(() => {
|
||||||
this.$set(this.updateParams, item.key, +data.toFixed(1))
|
this.$set(this.updateParams, item.key, +data.toFixed(1))
|
||||||
|
}, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public scoreFormat(data: any, item: any) {
|
public scoreFormat(data: any, item: any) {
|
||||||
if (item && item.key === 'score') {
|
if (item && item.key === 'score') {
|
||||||
this.updateParams.score = null;
|
this.updateParams.score = null;
|
||||||
|
setTimeout(() => {
|
||||||
this.$set(this.subUpdateParams, item.key, +data.toFixed(2))
|
this.$set(this.subUpdateParams, item.key, +data.toFixed(2))
|
||||||
|
}, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -560,6 +564,8 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
||||||
this.updateParams.members.splice(this.updateParams.members.findIndex(item => item.index === this.subUpdateParams.index), 1, this.subUpdateParams)
|
this.updateParams.members.splice(this.updateParams.members.findIndex(item => item.index === this.subUpdateParams.index), 1, this.subUpdateParams)
|
||||||
}
|
}
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
|
const option = this.subUpdateOptions.find(item => item.key === "score") as any;
|
||||||
|
option.hide = true
|
||||||
this.subShowUpdate = !!goOn;
|
this.subShowUpdate = !!goOn;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue