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
}
if (!this.analysisUpdateParams.riskLevel) {
this.analysisUpdateParams.riskControlLevel = null
}
this.riskUpdateForm()
this.remainUpdateForm()
}

View File

@ -268,7 +268,7 @@ export default class DrawComponent extends Vue {
}else{
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(){
@ -449,10 +449,10 @@ export default class DrawComponent extends Vue {
this.map.remove();
this.map = null;
}
destroyed(){
// console.log(123)
this.removeMap()
}
// destroyed(){
// // console.log(123)
// this.removeMap()
// }
}
</script>
<style lang="scss" scoped>

View File

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

View File

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

View File

@ -6,11 +6,15 @@
</div>
<div class="table-box flex-1">
<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">
<el-radio-button :label="item.value" v-for="item in tabs"
:key="item.value">{{item.name}}</el-radio-button>
</el-radio-group>
</el-radio-group> -->
</div>
<TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn"
@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 && 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>
<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>
<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>
<!-- <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">处理</el-button> -->
</template>

View File

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

View File

@ -44,7 +44,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public riskSource = [] as any;
public params = {
type: 1,
type: '1',
bpmSchemeCode: "prevention-yhzl"
} as any;
@ -117,15 +117,15 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public statusMap = { 0: "草稿", 1: "隐患上报", 2: "隐患确认", 3: "隐患治理", 4: "隐患验收", 5: "结束", 6: "中断", 7: "作废" };
public tabs = [{
name: "待办",
value: 1
value: '1'
}, {
name: "已办",
value: 2
value: '2'
}, {
name: "我发起的",
value: 3
}, { name: "作废", value: 4 },
{ name: "全部", value: 5 }]
value: '3'
}, { name: "作废", value: '4' },
{ name: "全部", value: '5' }]
public updateActions = [] as any;
@ -136,10 +136,12 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public executeResultMap = ["", "完成", "降低标准完成", "未完成", "延期完成", "延期未完成"];
public executeResultList = [{
name: "完成",
value: 1
value: 1,
disable: true,
}, {
name: "降低标准完成",
value: 2
value: 2,
disable: false,
}, {
name: "未完成",
value: 3
@ -163,6 +165,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
} else {
this.tableActionWidth = "150"
}
// this.params.type = +this.params.type
this.getTableData()
}
@ -472,96 +475,96 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
disable: true,
hide: !this.updateParams.id || this.updateParams.status === 0
},]
if (this.params)
this.updateOptions2 = [{
name: "隐患确认",
key: "reformConfirmFlag",
format: "reformConfirmFlagName",
type: "radio",
width: "100%",
require: true,
showError: false,
datas: this.isSure
}, {
name: "原因说明",
type: "textarea",
width: "100%",
key: "reformReasonDescription",
require: true,
hide: this.updateParams.reformConfirmFlag,
showError: false,
placeholder: "请输入未确认原因"
}, {
name: "治理人",
type: "select",
width: "calc(50% - 20px)",
require: true,
key: "executeUserId",
format: "executeUserName",
showError: false,
hide: this.updateParams.reformConfirmFlag === 0,
datas: this.$store.state.userList
}, {
name: "治理时限",
type: "date",
subType: "datetime",
width: "calc(50% - 20px)",
require: true,
key: "executeDeadline",
format: "yyyy-MM-dd HH:mm",
showError: false,
hide: this.updateParams.reformConfirmFlag === 0,
pickerOptions: this.getPickerOptions(this.updateParams.createTime, this.updateParams.reformDeadline)
}, {
name: "治理措施及要求",
type: "textarea",
width: "100%",
key: "executeMeasure",
require: true,
hide: this.updateParams.reformConfirmFlag === 0,
showError: false,
placeholder: "请输入治理措施与要求"
}, {
name: "治理资金",
type: "number",
width: "calc(50% - 20px)",
key: "executeMoney",
require: true,
hide: this.updateParams.reformConfirmFlag === 0,
showError: false,
rules: [
{ pattern: /^[1-9]\d{0,7}(\.\d{1,2})?$/, message: '不超过八位的整数,保留两位小数', },
],
unit: {
name: "元",
type: "text"
}
}, {
name: "资金来源",
type: "textarea",
width: "calc(50% - 20px)",
key: "executeMoneySource",
hide: this.updateParams.reformConfirmFlag === 0,
placeholder: "请输入资金来源"
}, {
name: "确认人",
type: "text",
width: "calc(50% - 20px)",
key: "realConfirmUserName",
require: true,
disable: true,
}, {
name: "确认时间",
type: "date",
subType: "datetime",
width: "calc(50% - 20px)",
require: true,
key: "realConfirmTime",
format: "yyyy-MM-dd HH:mm",
showError: false,
disable: true,
pickerOptions: this.getPickerOptions(this.updateParams.createTime),
}]
this.updateOptions2 = [{
name: "隐患确认",
key: "reformConfirmFlag",
format: "reformConfirmFlagName",
type: "radio",
width: "100%",
require: true,
showError: false,
datas: this.isSure,
disable: this.updateParams.realConfirmTime > this.updateParams.reformDeadline,
}, {
name: "原因说明",
type: "textarea",
width: "100%",
key: "reformReasonDescription",
require: true,
hide: this.updateParams.reformConfirmFlag,
showError: false,
placeholder: "请输入未确认原因"
}, {
name: "治理人",
type: "select",
width: "calc(50% - 20px)",
require: true,
key: "executeUserId",
format: "executeUserName",
showError: false,
hide: this.updateParams.reformConfirmFlag === 0,
datas: this.$store.state.userList
}, {
name: "治理时限",
type: "date",
subType: "datetime",
width: "calc(50% - 20px)",
require: true,
key: "executeDeadline",
format: "yyyy-MM-dd HH:mm",
showError: false,
hide: this.updateParams.reformConfirmFlag === 0,
pickerOptions: this.getPickerOptions(this.updateParams.createTime, this.updateParams.reformDeadline)
}, {
name: "治理措施及要求",
type: "textarea",
width: "100%",
key: "executeMeasure",
require: true,
hide: this.updateParams.reformConfirmFlag === 0,
showError: false,
placeholder: "请输入治理措施与要求"
}, {
name: "治理资金",
type: "number",
width: "calc(50% - 20px)",
key: "executeMoney",
require: true,
hide: this.updateParams.reformConfirmFlag === 0,
showError: false,
rules: [
{ pattern: /^[1-9]\d{0,7}(\.\d{1,2})?$/, message: '不超过八位的整数,保留两位小数', },
],
unit: {
name: "元",
type: "text"
}
}, {
name: "资金来源",
type: "textarea",
width: "calc(50% - 20px)",
key: "executeMoneySource",
hide: this.updateParams.reformConfirmFlag === 0,
placeholder: "请输入资金来源"
}, {
name: "确认人",
type: "text",
width: "calc(50% - 20px)",
key: "realConfirmUserName",
require: true,
disable: true,
}, {
name: "确认时间",
type: "date",
subType: "datetime",
width: "calc(50% - 20px)",
require: true,
key: "realConfirmTime",
format: "yyyy-MM-dd HH:mm",
showError: false,
disable: true,
pickerOptions: this.getPickerOptions(this.updateParams.createTime),
}]
this.updateOptions3 = [{
name: "接受确认",
key: "executeConfirmFlag",
@ -638,6 +641,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
format: "yyyy-MM-dd HH:mm",
showError: false,
pickerOptions: this.getPickerOptions(this.updateParams.realConfirmTime),
disable: true
}]
this.updateOptions4 = [{
name: "验证结果",
@ -684,6 +688,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
format: "yyyy-MM-dd HH:mm",
showError: false,
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", render: (data) => {
if (this.params.type === 1) {
if (this.params.type == 1) {
return `<span class="link">${data.title || '未命名'}</span>`
} else {
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: '隐患级', 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.reformModeMap[data.reformMode] });
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: "120", key: "reformDeadline" });
}
public rowCallback(el, data) {
const isTarget = el.target.classList.contains("link");
console.log('data',data);
if (isTarget) {
if (data.status === 2) {
const dateJudge = moment().format("YYYY-MM-DD HH:mm") > data.reformDeadline ? true : false;
data = Object.assign({
realConfirmUserId: this.account.userId,
realConfirmUserName: this.account.nickName,
realConfirmTime: moment().format("YYYY-MM-DD HH:mm"),
reformConfirmFlag: 1
// realConfirmTime: moment().format("YYYY-MM-DD HH:mm"),
reformConfirmFlag: dateJudge ? 0 : 1
}, data)
data.realConfirmTime = moment().format("YYYY-MM-DD HH:mm");
this.getTableCallback()
}
if (data.status === 3) {
const dateJudge = moment().format("YYYY-MM-DD HH:mm") > data.executeDeadline ? true : false
data = Object.assign({
realExecuteUserId: this.account.userId,
realExecuteUserName: this.account.nickName,
realExecuteTime: moment().format("YYYY-MM-DD HH:mm"),
executeConfirmFlag: 1
}, data)
this.executeResultList[0].disable = dateJudge
this.executeResultList[1].disable = dateJudge
this.getTableCallback()
}
if (data.status === 4) {
data = Object.assign({
@ -1053,6 +1063,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.status -= 1;
handleParams.type = "reject"
}
this.updateParams.realConfirmTime = moment().format('YYYY-MM-DD HH:mm:ss')
} else if (preStatus === 3) {
// 退
if (this.updateParams.executeConfirmFlag) {
@ -1062,6 +1073,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.status -= 1
handleParams.type = "reject"
}
this.updateParams.realExecuteTime = moment().format('YYYY-MM-DD HH:mm:ss')
} else if (preStatus === 4) {
// 退
if (this.updateParams.verifyConfirmFlag) {
@ -1070,6 +1082,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.status -= 1
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.resourceName = this.photoList.map(item => item.name).join(",")
@ -1277,6 +1290,14 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
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 {
border-bottom: 2px solid #409EFF !important;
}

View File

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

View File

@ -383,7 +383,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
//
const isDeleteUnit = this.judgeDeleteUnitMethod(this.updateParams);
if (!isDeleteUnit) {
this.judgeAnalControl(this.updateParams)
this.loadAnalControlList(this.updateParams.unitIds, true)
}
}
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) => {
this.areaService.getAnalControls(ids).then((res: any) => {
this.analControlList = res.data.map((item) => {
@ -402,7 +411,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
if (option) {
option.datas = this.analControlList;
}
if (isVerify) {
this.judgeAnalControl(this.updateParams)
}
resove()
})
})
@ -498,6 +509,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
}
//
if (item && item.key === 'unitIds') {
if (data.length === 0) {
this.updateParams.analControlIds = []
}
this.loadAnalControlList(data)
}
if (item && item.key === "chargeUserId") {

View File

@ -114,7 +114,7 @@
</div>
<div class="sub-title" v-if="!hideActions">隐患登记情况</div>
<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>
</div>

View File

@ -6,17 +6,20 @@
</div>
<div class="table-box flex-1">
<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">
<el-radio-button :label="item.value" v-for="item in tabs"
:key="item.value">{{item.name}}</el-radio-button>
</el-radio-group>
</el-radio-group> -->
</div>
<TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn"
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@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%">
<el-table-column label="序号" width="60">
<div slot-scope="scope">{{scope.$index+1}}</div>
@ -52,7 +55,7 @@
<TableComponent :tableData="updateParams.pointExchangeDetails" :tableColumn="subTableColumn"
@actionCallback="subCallback($event)" :actions="isReadonly? []: subTableActions" actionPosition="flex-start"
: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"
style="width: 100%">
<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>
<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;">
<el-table ref="multipleTable" :data="updateParams.pointExchangeDetails" tooltip-effect="dark"
<el-table :data="updateParams.pointExchangeDetails" tooltip-effect="dark"
height="250" border style="width: 100%">
<template v-for="item in subTableColumn">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
@ -119,8 +121,6 @@
</template>
</el-table>
</TableComponent>
</FormComponent>
</el-dialog>
</div>

View File

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

View File

@ -367,6 +367,14 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
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?) {

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: '任务状态', width: "110px", key: "status", render: (data) => {
if (data.status == 2) {
if (this.nowDate < data.taskStartTime) {
return '即将开始'
} else {
return "<span class='color_2'>待排查</span>"
}
if (data.status == 4) {
return '即将开始'
} else if (data.status == 2) {
return "<span class='color_2'>待排查</span>"
} else if (data.status == 1) {
return "<span class='color_1'>已排查</span>"
} else if (data.status == 3) {

View File

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

View File

@ -114,7 +114,7 @@
</el-input>
</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"
:disabled="isReadonly ? isReadonly: filterSelectedData(item,selected)" :label="JSON.stringify(item)"
:key="index">{{item.riskName}}</el-checkbox>

View File

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