feat:修复bug

dev
kongyeqing 2023-10-07 09:23:43 +08:00
parent 12c16f4314
commit 813c0cc5c3
18 changed files with 255 additions and 181 deletions

View File

@ -897,9 +897,12 @@ export default class AnalEvaluationComponent extends Vue {
} }
} }
} }
if(this.analysisUpdateParams.riskLevel === 4){ if (this.analysisUpdateParams.riskLevel === 4) {
this.analysisUpdateParams.riskControlLevel = 1 this.analysisUpdateParams.riskControlLevel = 1
} }
if (!this.analysisUpdateParams.riskLevel) {
this.analysisUpdateParams.riskControlLevel = null
}
this.riskUpdateForm() this.riskUpdateForm()
this.remainUpdateForm() this.remainUpdateForm()
} }

View File

@ -268,7 +268,7 @@ export default class DrawComponent extends Vue {
}else{ }else{
this.positions.splice(this.positions.findIndex((item:any)=>item.id===e.features[0].id),1) this.positions.splice(this.positions.findIndex((item:any)=>item.id===e.features[0].id),1)
} }
console.log(this.positions) // console.log(this.positions)
} }
public drawScreenFull(){ public drawScreenFull(){
@ -449,10 +449,10 @@ export default class DrawComponent extends Vue {
this.map.remove(); this.map.remove();
this.map = null; this.map = null;
} }
destroyed(){ // destroyed(){
// console.log(123) // // console.log(123)
this.removeMap() // this.removeMap()
} // }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -34,7 +34,7 @@ export default class MapComponent extends Vue {
} }
public initMap() { public initMap() {
mapboxgl.accessToken = "sk.eyJ1IjoiaGJ0a2owMjUiLCJhIjoiY2xtc201MHFjMDF5dzJrcWx5c3NiYzR4YiJ9.JEAHC6qFH5EDFTzJDb7Mzg"; mapboxgl.accessToken = "pk.eyJ1IjoiaGJ0a2owMjUiLCJhIjoiY2xtYWFobzgxMHBtbDNkbnpwNXJjZW1xNCJ9.lTnRVhs5R5BJ7lswSDufYQ";
this.map = new mapboxgl.Map({ this.map = new mapboxgl.Map({
// accessToken :"pk.eyJ1IjoiMTgzODI0ZHl0IiwiYSI6ImNqbHExNDVjZzI0ZmUza2wxMDhocnlyem4ifQ.FZoJzmqTtli8hAvvAc1OPA", // accessToken :"pk.eyJ1IjoiMTgzODI0ZHl0IiwiYSI6ImNqbHExNDVjZzI0ZmUza2wxMDhocnlyem4ifQ.FZoJzmqTtli8hAvvAc1OPA",
container: this.id, container: this.id,

View File

@ -222,3 +222,9 @@
font-size: 20px; font-size: 20px;
scale: 0.5; scale: 0.5;
} }
.tabs_full{
width: 100%;
border-bottom: 1px solid #E5E7ED;
margin-bottom: 24px;
}

View File

@ -55,7 +55,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
public isReadonly = false; public isReadonly = false;
public account = JSON.parse(localStorage.getItem("account") as string); public account = JSON.parse(localStorage.getItem("account") as string);
public showMap = false; public showMap = false;
public center = [118.751353, 31.969568]; public center = [119.59255784201673,
34.51914867625878];
public marker: any; public marker: any;
public map: any; public map: any;
@ -581,7 +582,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
if (!row) { if (!row) {
this.tableService.getNumber().then(res => { this.tableService.getNumber().then(res => {
this.updateParams.number = res.data; this.updateParams.number = res.data;
this.center = [118.751353, 31.969568]; // this.center = [118.751353, 31.969568];
this.buildUpdateForm(); this.buildUpdateForm();
// //
this.clearFileListMethod(); this.clearFileListMethod();

View File

@ -6,11 +6,15 @@
</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">
<el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type" <el-tabs v-model="params.type" @tab-click="tabTableChange">
<el-tab-pane v-for="item in tabs" :label="item.name" :key="item.value"
:name="item.value"></el-tab-pane>
</el-tabs>
<!-- <el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type"
@change="tabTableChange"> @change="tabTableChange">
<el-radio-button :label="item.value" v-for="item in tabs" <el-radio-button :label="item.value" v-for="item in tabs"
:key="item.value">{{item.name}}</el-radio-button> :key="item.value">{{item.name}}</el-radio-button>
</el-radio-group> </el-radio-group> -->
</div> </div>
<TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn" <TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn"
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@ -48,13 +52,13 @@
<!-- <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" <el-button type="text"
v-if="isManager && params.type===3 && scope.row.taskInfo.processStatus === 1" v-if="isManager && params.type==3 && scope.row.taskInfo.processStatus === 1"
@click="changeStatus(scope.row, 1)">中断</el-button> @click="changeStatus(scope.row, 1)">中断</el-button>
<el-button type="text" <el-button type="text"
v-if="isManager && params.type===3 && scope.row.taskInfo.processStatus === 2" v-if="isManager && params.type==3 && scope.row.taskInfo.processStatus === 2"
@click="changeStatus(scope.row, 2)">恢复</el-button> @click="changeStatus(scope.row, 2)">恢复</el-button>
<el-button type="text" <el-button type="text"
v-if="isManager && params.type===3 && scope.row.taskInfo.processStatus === 1" v-if="isManager && params.type==3 && scope.row.taskInfo.processStatus === 1"
@click="changeStatus(scope.row, 3)">作废</el-button> @click="changeStatus(scope.row, 3)">作废</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> -->
</template> </template>

View File

@ -430,7 +430,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
showError: false, showError: false,
placeholder: "请输入未确认原因" placeholder: "请输入未确认原因"
}, { }, {
name: "治理人", name: "治理责任人",
type: "select", type: "select",
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
require: true, require: true,

View File

@ -44,7 +44,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public riskSource = [] as any; public riskSource = [] as any;
public params = { public params = {
type: 1, type: '1',
bpmSchemeCode: "prevention-yhzl" bpmSchemeCode: "prevention-yhzl"
} as any; } as any;
@ -117,15 +117,15 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public statusMap = { 0: "草稿", 1: "隐患上报", 2: "隐患确认", 3: "隐患治理", 4: "隐患验收", 5: "结束", 6: "中断", 7: "作废" }; public statusMap = { 0: "草稿", 1: "隐患上报", 2: "隐患确认", 3: "隐患治理", 4: "隐患验收", 5: "结束", 6: "中断", 7: "作废" };
public tabs = [{ public tabs = [{
name: "待办", name: "待办",
value: 1 value: '1'
}, { }, {
name: "已办", name: "已办",
value: 2 value: '2'
}, { }, {
name: "我发起的", name: "我发起的",
value: 3 value: '3'
}, { name: "作废", value: 4 }, }, { name: "作废", value: '4' },
{ name: "全部", value: 5 }] { name: "全部", value: '5' }]
public updateActions = [] as any; public updateActions = [] as any;
@ -136,10 +136,12 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public executeResultMap = ["", "完成", "降低标准完成", "未完成", "延期完成", "延期未完成"]; public executeResultMap = ["", "完成", "降低标准完成", "未完成", "延期完成", "延期未完成"];
public executeResultList = [{ public executeResultList = [{
name: "完成", name: "完成",
value: 1 value: 1,
disable: true,
}, { }, {
name: "降低标准完成", name: "降低标准完成",
value: 2 value: 2,
disable: false,
}, { }, {
name: "未完成", name: "未完成",
value: 3 value: 3
@ -163,6 +165,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
} else { } else {
this.tableActionWidth = "150" this.tableActionWidth = "150"
} }
// this.params.type = +this.params.type
this.getTableData() this.getTableData()
} }
@ -472,7 +475,6 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
disable: true, disable: true,
hide: !this.updateParams.id || this.updateParams.status === 0 hide: !this.updateParams.id || this.updateParams.status === 0
},] },]
if (this.params)
this.updateOptions2 = [{ this.updateOptions2 = [{
name: "隐患确认", name: "隐患确认",
key: "reformConfirmFlag", key: "reformConfirmFlag",
@ -481,7 +483,8 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
width: "100%", width: "100%",
require: true, require: true,
showError: false, showError: false,
datas: this.isSure datas: this.isSure,
disable: this.updateParams.realConfirmTime > this.updateParams.reformDeadline,
}, { }, {
name: "原因说明", name: "原因说明",
type: "textarea", type: "textarea",
@ -638,6 +641,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
format: "yyyy-MM-dd HH:mm", format: "yyyy-MM-dd HH:mm",
showError: false, showError: false,
pickerOptions: this.getPickerOptions(this.updateParams.realConfirmTime), pickerOptions: this.getPickerOptions(this.updateParams.realConfirmTime),
disable: true
}] }]
this.updateOptions4 = [{ this.updateOptions4 = [{
name: "验证结果", name: "验证结果",
@ -684,6 +688,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
format: "yyyy-MM-dd HH:mm", format: "yyyy-MM-dd HH:mm",
showError: false, showError: false,
pickerOptions: this.getPickerOptions(this.updateParams.realExecuteTime), pickerOptions: this.getPickerOptions(this.updateParams.realExecuteTime),
disable: true
}] }]
} }
@ -721,7 +726,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.tableColumn.push({ name: '上报时间', width: "150", key: "reportTime", render: (data) => data.reportTime || "--" }); this.tableColumn.push({ name: '上报时间', width: "150", key: "reportTime", render: (data) => data.reportTime || "--" });
this.tableColumn.push({ this.tableColumn.push({
name: '隐患标题', width: "150", render: (data) => { name: '隐患标题', width: "150", render: (data) => {
if (this.params.type === 1) { if (this.params.type == 1) {
return `<span class="link">${data.title || '未命名'}</span>` return `<span class="link">${data.title || '未命名'}</span>`
} else { } else {
return data.title return data.title
@ -729,35 +734,40 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
} }
}); });
this.tableColumn.push({ name: '隐患描述', key: "description", width: "300" }); this.tableColumn.push({ name: '隐患描述', key: "description", width: "300" });
this.tableColumn.push({ name: '隐患级', render: (data) => this.levelMap[data.level] }); this.tableColumn.push({ name: '隐患', render: (data) => this.levelMap[data.level] });
this.tableColumn.push({ name: '隐患分类', render: (data) => this.$store.getters.prevention_dangrous_type_map[data.classify] }); this.tableColumn.push({ name: '隐患分类', render: (data) => this.$store.getters.prevention_dangrous_type_map[data.classify] });
this.tableColumn.push({ name: '整改方式', render: (data) => this.reformModeMap[data.reformMode] }); this.tableColumn.push({ name: '整改方式', render: (data) => this.reformModeMap[data.reformMode] });
this.tableColumn.push({ name: '隐患位置', width: "150", key: "locationName" }); this.tableColumn.push({ name: '隐患位置', width: "150", key: "locationName" });
this.tableColumn.push({ name: '治理责任人', width: "100", key: "executeUserName" }); this.tableColumn.push({ name: '治理人', width: "100", key: "executeUserName" });
this.tableColumn.push({ name: '整改结果', width: "100", render: (data) => this.executeResultMap[data.executeResult] }); this.tableColumn.push({ name: '整改结果', width: "100", render: (data) => this.executeResultMap[data.executeResult] });
this.tableColumn.push({ name: '整改时限', width: "120", key: "reformDeadline" }); this.tableColumn.push({ name: '整改时限', width: "120", key: "reformDeadline" });
} }
public rowCallback(el, data) { public rowCallback(el, data) {
const isTarget = el.target.classList.contains("link"); const isTarget = el.target.classList.contains("link");
console.log('data',data);
if (isTarget) { if (isTarget) {
if (data.status === 2) { if (data.status === 2) {
const dateJudge = moment().format("YYYY-MM-DD HH:mm") > data.reformDeadline ? true : false;
data = Object.assign({ data = Object.assign({
realConfirmUserId: this.account.userId, realConfirmUserId: this.account.userId,
realConfirmUserName: this.account.nickName, realConfirmUserName: this.account.nickName,
realConfirmTime: moment().format("YYYY-MM-DD HH:mm"), // realConfirmTime: moment().format("YYYY-MM-DD HH:mm"),
reformConfirmFlag: 1 reformConfirmFlag: dateJudge ? 0 : 1
}, data) }, data)
data.realConfirmTime = moment().format("YYYY-MM-DD HH:mm");
this.getTableCallback()
} }
if (data.status === 3) { if (data.status === 3) {
const dateJudge = moment().format("YYYY-MM-DD HH:mm") > data.executeDeadline ? true : false
data = Object.assign({ data = Object.assign({
realExecuteUserId: this.account.userId, realExecuteUserId: this.account.userId,
realExecuteUserName: this.account.nickName, realExecuteUserName: this.account.nickName,
realExecuteTime: moment().format("YYYY-MM-DD HH:mm"), realExecuteTime: moment().format("YYYY-MM-DD HH:mm"),
executeConfirmFlag: 1 executeConfirmFlag: 1
}, data) }, data)
this.executeResultList[0].disable = dateJudge
this.executeResultList[1].disable = dateJudge
this.getTableCallback()
} }
if (data.status === 4) { if (data.status === 4) {
data = Object.assign({ data = Object.assign({
@ -1053,6 +1063,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.status -= 1; this.updateParams.status -= 1;
handleParams.type = "reject" handleParams.type = "reject"
} }
this.updateParams.realConfirmTime = moment().format('YYYY-MM-DD HH:mm:ss')
} else if (preStatus === 3) { } else if (preStatus === 3) {
// 退 // 退
if (this.updateParams.executeConfirmFlag) { if (this.updateParams.executeConfirmFlag) {
@ -1062,6 +1073,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.status -= 1 this.updateParams.status -= 1
handleParams.type = "reject" handleParams.type = "reject"
} }
this.updateParams.realExecuteTime = moment().format('YYYY-MM-DD HH:mm:ss')
} else if (preStatus === 4) { } else if (preStatus === 4) {
// 退 // 退
if (this.updateParams.verifyConfirmFlag) { if (this.updateParams.verifyConfirmFlag) {
@ -1070,6 +1082,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.status -= 1 this.updateParams.status -= 1
handleParams.type = "reject" handleParams.type = "reject"
} }
this.updateParams.realVerifyTime = moment().format('YYYY-MM-DD HH:mm:ss')
} }
this.updateParams.resourceId = this.photoList.map(item => item.id).join(",") this.updateParams.resourceId = this.photoList.map(item => item.id).join(",")
this.updateParams.resourceName = this.photoList.map(item => item.name).join(",") this.updateParams.resourceName = this.photoList.map(item => item.name).join(",")
@ -1277,6 +1290,14 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
border: none !important; border: none !important;
} }
.el-radio-button:first-child .el-radio-button__inner {
border-radius: 0px !important;
}
.el-radio-button:last-child .el-radio-button__inner {
border-radius: 0px !important;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner { .el-radio-button__orig-radio:checked+.el-radio-button__inner {
border-bottom: 2px solid #409EFF !important; border-bottom: 2px solid #409EFF !important;
} }

View File

@ -204,6 +204,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
}, { }, {
name: "适用对象", name: "适用对象",
key: "targets", key: "targets",
format: "analControlNames",
type: "select", type: "select",
multiple: true, multiple: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
@ -323,17 +324,24 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
if (isVerify) { if (isVerify) {
// //
const isDeleteUnit = this.judgeDeleteUnitMethod(this.updateParams); const isDeleteUnit = this.judgeDeleteUnitMethod(this.updateParams);
console.log('isDeleteUnit',isDeleteUnit);
if (!isDeleteUnit) { if (!isDeleteUnit) {
this.judgeAnalControl(this.updateParams) this.loadAnalControlList(this.updateParams.units, true)
} }
} }
}) })
} }
// //
public loadAnalControlList(ids?) { public loadAnalControlList(ids?, isVerify = false) {
if (!ids || ids.length === 0) {
this.analControlList = [];
this.analControlNameList = [];
const option = this.updateOptions.find(item => item.key === "targets") as any;
if (option) {
option.datas = this.analControlList;
}
return
}
return new Promise<void>((resove, reject) => { return new Promise<void>((resove, reject) => {
this.areaService.getAnalControls(ids).then((res: any) => { this.areaService.getAnalControls(ids).then((res: any) => {
this.analControlList = res.data.map((item) => { this.analControlList = res.data.map((item) => {
@ -344,6 +352,9 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
if (option) { if (option) {
option.datas = this.analControlList; option.datas = this.analControlList;
} }
if (isVerify) {
this.judgeAnalControl(this.updateParams)
}
resove() resove()
}) })
}) })
@ -404,6 +415,9 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
} }
// //
if (item && item.key === 'units') { if (item && item.key === 'units') {
if (data.length === 0) {
this.updateParams.targets = []
}
this.loadAnalControlList(data) this.loadAnalControlList(data)
} }
} }
@ -526,7 +540,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.isReadonly = !!isRead; this.isReadonly = !!isRead;
this.clearSelect() this.clearSelect()
if (!row) { if (!row) {
this.updateParams = { units: [], tableItems: [] } as any this.updateParams = { number: '', units: [], tableItems: [] } as any
this.currentId = -1; this.currentId = -1;
this.getNumber(); this.getNumber();
this.buildUpdateForm(); this.buildUpdateForm();
@ -542,7 +556,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
}).join(',') }).join(',')
} else { } else {
this.updateParams = res.data; this.updateParams = res.data;
// //
let isDeleteArea = this.judgeDeleteAreaMethod(res); let isDeleteArea = this.judgeDeleteAreaMethod(res);
if (!isDeleteArea) { if (!isDeleteArea) {
this.loadUnitData(res.data.areas, true); this.loadUnitData(res.data.areas, true);
@ -680,7 +694,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.updateParams.targets = this.updateParams.targets.map(item => { this.updateParams.targets = this.updateParams.targets.map(item => {
return { return {
id: item, id: item,
name: this.$store.getters.prevention_anal_control_map[item] name: this.analControlNameList[item]
} }
}) })
this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then(res => { this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then(res => {

View File

@ -383,7 +383,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
// //
const isDeleteUnit = this.judgeDeleteUnitMethod(this.updateParams); const isDeleteUnit = this.judgeDeleteUnitMethod(this.updateParams);
if (!isDeleteUnit) { if (!isDeleteUnit) {
this.judgeAnalControl(this.updateParams) this.loadAnalControlList(this.updateParams.unitIds, true)
} }
} }
resove() resove()
@ -391,7 +391,16 @@ export default class PlanComponent extends BaseRecordComponent<any> {
}) })
} }
// //
public loadAnalControlList(ids?) { public loadAnalControlList(ids?, isVerify = false) {
if (!ids || ids.length === 0) {
this.analControlList = [];
this.analControlNameList = [];
const option = this.updateOptions.find(item => item.key === "analControlIds") as any;
if (option) {
option.datas = this.analControlList;
}
return
}
return new Promise<void>((resove, reject) => { return new Promise<void>((resove, reject) => {
this.areaService.getAnalControls(ids).then((res: any) => { this.areaService.getAnalControls(ids).then((res: any) => {
this.analControlList = res.data.map((item) => { this.analControlList = res.data.map((item) => {
@ -402,7 +411,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
if (option) { if (option) {
option.datas = this.analControlList; option.datas = this.analControlList;
} }
if (isVerify) {
this.judgeAnalControl(this.updateParams)
}
resove() resove()
}) })
}) })
@ -498,6 +509,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
} }
// //
if (item && item.key === 'unitIds') { if (item && item.key === 'unitIds') {
if (data.length === 0) {
this.updateParams.analControlIds = []
}
this.loadAnalControlList(data) this.loadAnalControlList(data)
} }
if (item && item.key === "chargeUserId") { if (item && item.key === "chargeUserId") {

View File

@ -114,7 +114,7 @@
</div> </div>
<div class="sub-title" v-if="!hideActions">隐患登记情况</div> <div class="sub-title" v-if="!hideActions">隐患登记情况</div>
<div class="full" style="margin-bottom: 20px;text-align: end;" v-if="isAction && !hideActions"> <div class="full" style="margin-bottom: 20px;text-align: end;" v-if="isAction && !hideActions">
<el-button type="success" plain @click="showUpdateModel()" icon="el-icon-plus">添加</el-button> <el-button type="primary" plain @click="showUpdateModel()" icon="el-icon-plus">添加</el-button>
<el-button type="danger" plain @click="callback({value:'delete'})" icon="el-icon-delete">批量删除</el-button> <el-button type="danger" plain @click="callback({value:'delete'})" icon="el-icon-delete">批量删除</el-button>
</div> </div>

View File

@ -6,17 +6,20 @@
</div> </div>
<div class="table-box flex-1"> <div class="table-box flex-1">
<div class="full" v-if="isExchange"> <div class="full" v-if="isExchange">
<el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type" <el-tabs v-model="params.type" @tab-click="tabTableChange">
<el-tab-pane v-for="item in tabs" :label="item.name" :key="item.value" :name="item.value"></el-tab-pane>
</el-tabs>
<!-- <el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type"
@change="tabTableChange"> @change="tabTableChange">
<el-radio-button :label="item.value" v-for="item in tabs" <el-radio-button :label="item.value" v-for="item in tabs"
:key="item.value">{{item.name}}</el-radio-button> :key="item.value">{{item.name}}</el-radio-button>
</el-radio-group> </el-radio-group> -->
</div> </div>
<TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn" <TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn"
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" @actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :actions="tableActions"> @pageSizeChange="callback($event,'pageSize')" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked" <el-table :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%"> @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column label="序号" width="60"> <el-table-column label="序号" width="60">
<div slot-scope="scope">{{scope.$index+1}}</div> <div slot-scope="scope">{{scope.$index+1}}</div>
@ -52,7 +55,7 @@
<TableComponent :tableData="updateParams.pointExchangeDetails" :tableColumn="subTableColumn" <TableComponent :tableData="updateParams.pointExchangeDetails" :tableColumn="subTableColumn"
@actionCallback="subCallback($event)" :actions="isReadonly? []: subTableActions" actionPosition="flex-start" @actionCallback="subCallback($event)" :actions="isReadonly? []: subTableActions" actionPosition="flex-start"
:showFooter="false" style="margin-bottom: 20px;"> :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updateParams.pointExchangeDetails" tooltip-effect="dark" <el-table :data="updateParams.pointExchangeDetails" tooltip-effect="dark"
max-height="500" border row-key="checked" @selection-change="handleSubSelectionChange" max-height="500" border row-key="checked" @selection-change="handleSubSelectionChange"
style="width: 100%"> 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">
@ -104,10 +107,9 @@
<!-- 兑换清单 --> <!-- 兑换清单 -->
<el-dialog :close-on-click-modal="false" title="兑换清单" :visible.sync="showProtable" width="952px" destroy-on-close> <el-dialog :close-on-click-modal="false" title="兑换清单" :visible.sync="showProtable" width="952px" destroy-on-close>
<FormComponent labelWidth="110px" labelAlign="right" :full-btn="true" btnPosition="center">
<TableComponent :tableData="updateParams.pointExchangeDetails" :tableColumn="subTableColumn" <TableComponent :tableData="updateParams.pointExchangeDetails" :tableColumn="subTableColumn"
:showFooter="false" style="margin-bottom: 20px;"> :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updateParams.pointExchangeDetails" tooltip-effect="dark" <el-table :data="updateParams.pointExchangeDetails" tooltip-effect="dark"
height="250" border style="width: 100%"> height="250" border style="width: 100%">
<template v-for="item in subTableColumn"> <template v-for="item in subTableColumn">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key"> <el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
@ -119,8 +121,6 @@
</template> </template>
</el-table> </el-table>
</TableComponent> </TableComponent>
</FormComponent>
</el-dialog> </el-dialog>
</div> </div>

View File

@ -31,7 +31,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public params = { public params = {
applicantId: null, applicantId: null,
type: 1, type: '1',
bpmSchemeCode: "prevention-jfdh" bpmSchemeCode: "prevention-jfdh"
} as any; } as any;
@ -79,6 +79,8 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public isRepeal = false; public isRepeal = false;
public tipsStatus = false;
public formActions = [{ public formActions = [{
name: "查询", name: "查询",
value: "search", value: "search",
@ -149,19 +151,19 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public tabs = [{ public tabs = [{
name: "待办", name: "待办",
value: 1 value: '1'
}, { }, {
name: "已办", name: "已办",
value: 2 value: '2'
}, { }, {
name: "我发起的", name: "我发起的",
value: 3 value: '3'
}, { }, {
name: "作废", name: "作废",
value: 4 value: '4'
}, { }, {
name: "全部", name: "全部",
value: 5 value: '5'
} }
] ]
@ -184,13 +186,13 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
}, },
{ {
name: "部门", name: "部门",
type: "treeSelect", type: "select",
key: "applicantDeptId", key: "applicantDeptId",
format: "applicantDeptName", format: "applicantDeptName",
require: true, require: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
expandLevel: Infinity, // expandLevel: Infinity,
datas: this.$store.state.deptTreeList, datas: this.$store.state.deptList,
disable: true, disable: true,
}, },
{ {
@ -390,16 +392,18 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.tableColumn.push({ name: '最新提交时间', width: "180", key: "updateTime", sortable: 'custom' }); this.tableColumn.push({ name: '最新提交时间', width: "180", key: "updateTime", sortable: 'custom' });
this.tableColumn.push({ this.tableColumn.push({
name: '发起人', width: "100", key: "startUser", render: (data) => { name: '发起人', width: "100", key: "startUser", render: (data) => {
if (this.params.type === 1) { if (this.params.type == 1) {
return `<span class="link applicantName">${data.applicantName}</span>` return `<span class="link applicantName">${data.applicantName}</span>`
} else { } else {
return data.applicantName return data.applicantName
} }
} }
}); });
this.tableColumn.push({ name: '发起时间', key: "applyTime",render:(data)=>{ this.tableColumn.push({
name: '发起时间', key: "applyTime", render: (data) => {
return moment(data.applyTime).format('YYYY-MM-DD HH:mm') return moment(data.applyTime).format('YYYY-MM-DD HH:mm')
} }); }
});
this.tableColumn.push({ this.tableColumn.push({
name: '兑换清单', key: "goodsNumber", render: (data) => { name: '兑换清单', key: "goodsNumber", render: (data) => {
return `<span class="link goodsNumber">${data.goodsNumber}</span>` return `<span class="link goodsNumber">${data.goodsNumber}</span>`
@ -537,10 +541,10 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.subSelectData = data; this.subSelectData = data;
} }
public tabTableChange(type) { public tabTableChange(e) {
this.params.type = type; // this.params.type = type;
this.getTableData() this.getTableData()
if (type === 3) { if (e.name == 3) {
this.isRepeal = true this.isRepeal = true
} else { } else {
this.isRepeal = false this.isRepeal = false
@ -676,6 +680,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.$message.error("您的兑换数量不能超出库存"); this.$message.error("您的兑换数量不能超出库存");
this.subUpdateParams.exchangeNumber = null; this.subUpdateParams.exchangeNumber = null;
this.subUpdateParams.remainStock = null; this.subUpdateParams.remainStock = null;
this.tipsStatus = true;
} }
this.countStockAndIntegral(res.data.stockNumber, res.data.goodsPrice, this.subUpdateParams.exchangeNumber) this.countStockAndIntegral(res.data.stockNumber, res.data.goodsPrice, this.subUpdateParams.exchangeNumber)
} else { } else {
@ -688,7 +693,8 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
if (item && item.key === "exchangeNumber") { if (item && item.key === "exchangeNumber") {
if (data && data > this.subUpdateParams.stockNumber) { if (data && data > this.subUpdateParams.stockNumber) {
this.$message.error("您的兑换数量不能超出库存"); this.$message.error("您的兑换数量不能超出库存");
this.subUpdateParams.exchangeNumber = null this.subUpdateParams.exchangeNumber = null;
this.tipsStatus = true;
} }
if (this.subUpdateParams.goodsId) { if (this.subUpdateParams.goodsId) {
this.countStockAndIntegral(this.subUpdateParams.stockNumber, this.subUpdateParams.goodsPrice, this.subUpdateParams.exchangeNumber ? this.subUpdateParams.exchangeNumber : 0) this.countStockAndIntegral(this.subUpdateParams.stockNumber, this.subUpdateParams.goodsPrice, this.subUpdateParams.exchangeNumber ? this.subUpdateParams.exchangeNumber : 0)
@ -719,7 +725,10 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
// //
if (this.subShowUpdate) { if (this.subShowUpdate) {
if (!this.subUpdateParams.exchangeNumber) { if (!this.subUpdateParams.exchangeNumber) {
if (this.tipsStatus === false) {
this.$message.error("请您输入兑换数量!"); this.$message.error("请您输入兑换数量!");
}
this.tipsStatus = false;
return return
} }
// //
@ -799,8 +808,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
// //
public rowCallback(el, data) { public rowCallback(el, data) {
const isTarget = el.target.classList.contains("applicantName"); if (el.target.classList.contains("applicantName")) {
if (isTarget) {
this.tableService.getListDetail({ id: data.id }).then((res: any) => { this.tableService.getListDetail({ id: data.id }).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
this.updateParams = res.data this.updateParams = res.data
@ -830,15 +838,13 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.showUpdate = true this.showUpdate = true
} }
}) })
} else { } else if (el.target.classList.contains("goodsNumber")) {
this.tableService.getListDetail({ id: data.id }).then((res: any) => { this.tableService.getListDetail({ id: data.id }).then((res: any) => {
if (res.code === 200) { this.updateParams = res.data;
this.updateParams = res.data this.updateParams.taskId = data.taskId;
this.updateParams.taskId = data.taskId
this.updateParams.pointExchangeDetails.forEach((item, index) => { this.updateParams.pointExchangeDetails.forEach((item, index) => {
item.index = index + 1 item.index = index + 1;
}) })
}
}) })
this.showProtable = true this.showProtable = true
} }
@ -894,7 +900,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
} }
}) })
} else { } else {
if (type === 5) { if (type == 5) {
this.$confirm('确认作废所选数据', '确认数据', { this.$confirm('确认作废所选数据', '确认数据', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

View File

@ -367,6 +367,14 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
this.updateParams.majorHazardLevel = ''; this.updateParams.majorHazardLevel = '';
} }
} }
//
if (item && item.key === 'name') {
if (this.updateParams.geoJson !== '[]') {
let tmpGeoJson = JSON.parse(this.updateParams.geoJson);
tmpGeoJson[0]['properties']['name'] = this.updateParams.name;
this.$set(this.updateParams, 'geoJson', JSON.stringify(tmpGeoJson))
}
}
} }
public callback(data, type?) { public callback(data, type?) {

View File

@ -311,13 +311,10 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
this.tableColumn.push({ name: '截止时间', key: "taskEndTime", sortable: 'custom' }); this.tableColumn.push({ name: '截止时间', key: "taskEndTime", sortable: 'custom' });
this.tableColumn.push({ this.tableColumn.push({
name: '任务状态', width: "110px", key: "status", render: (data) => { name: '任务状态', width: "110px", key: "status", render: (data) => {
if (data.status == 2) { if (data.status == 4) {
if (this.nowDate < data.taskStartTime) {
return '即将开始' return '即将开始'
} else { } else if (data.status == 2) {
return "<span class='color_2'>待排查</span>" return "<span class='color_2'>待排查</span>"
}
} else if (data.status == 1) { } else if (data.status == 1) {
return "<span class='color_1'>已排查</span>" return "<span class='color_1'>已排查</span>"
} else if (data.status == 3) { } else if (data.status == 3) {

View File

@ -332,7 +332,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
name: "区域名称", name: "区域名称",
key: "areaName", key: "areaName",
type: "text" type: "text"
},{ }, {
name: "单元名称", name: "单元名称",
key: "name", key: "name",
type: "text" type: "text"
@ -352,7 +352,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
type: 0, type: 0,
data: "", data: "",
params: { params: {
"区域编号": row.areaNo, "区域名称": row.areaName,
"单元名称": row.name, "单元名称": row.name,
"单元编号": row.number, "单元编号": row.number,
"责任人": row.chargeUserName, "责任人": row.chargeUserName,

View File

@ -114,7 +114,7 @@
</el-input> </el-input>
</template> </template>
<!-- 风险点展示 --> <!-- 风险点展示 -->
<el-checkbox-group v-model="updateParams.teams[selected]['risks']"> <el-checkbox-group v-model="updateParams.teams[selected]['risks']" style="overflow: hidden;overflow-y: auto;height: 500px;">
<el-checkbox v-for="(item,index) in bindRiskGroup" <el-checkbox v-for="(item,index) in bindRiskGroup"
:disabled="isReadonly ? isReadonly: filterSelectedData(item,selected)" :label="JSON.stringify(item)" :disabled="isReadonly ? isReadonly: filterSelectedData(item,selected)" :label="JSON.stringify(item)"
:key="index">{{item.riskName}}</el-checkbox> :key="index">{{item.riskName}}</el-checkbox>

View File

@ -747,7 +747,7 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
.bind-risk-content { .bind-risk-content {
width: 70%; width: 75%;
margin-left: 20px; margin-left: 20px;
.el-checkbox-group { .el-checkbox-group {