feat:修复隐患bug

dev
kongyeqing 2023-09-13 18:03:19 +08:00
parent 6be98c6962
commit 1b7a1eaf53
46 changed files with 416 additions and 258 deletions

View File

@ -601,7 +601,7 @@ export default class MeasureComponent extends Vue {
}
//
if (item && item.key === 'executeStartTime') {
const now = moment().format("YYYY-MM-DD HH:mm");
const now = moment().format("YYYY-MM-DD HH:mm:ss");
if (now > data) {
this.$message.warning("开始执行时间不能早于当前时间")
this.taskUpdataParams.executeStartTime = null;

View File

@ -1,201 +1,211 @@
::v-deep {
.color_0 {
color: #F56C6C
}
.color_1 {
color: #68C23A
}
.color_0 {
color: #f56c6c;
}
.color_1 {
color: #68c23a;
}
.color_2 {
color: #409EFF
}
.color_2 {
color: #409eff;
}
.color_3 {
color: #E6A23C
}
.color_3 {
color: #e6a23c;
}
.color_4 {
color: #F56C6C
}
.color_4 {
color: #f56c6c;
}
.color_5{
color: rgba(0,0,0,0.5)
}
.color_5 {
color: rgba(0, 0, 0, 0.5);
}
.color_level_1{
.color_level_1 {
color: #fff;
background-color: #116ff5;
padding: 5px 21px;
font-size: 12px;
border-radius: 4px;
}
.color_level_2 {
color: #fff;
background-color: #ffc019;
padding: 5px 15px;
font-size: 12px;
border-radius: 4px;
}
.color_level_3 {
color: #fff;
background-color: #ff7802;
padding: 5px 15px;
font-size: 12px;
border-radius: 4px;
}
.color_level_4 {
color: #fff;
background-color: #e31c21;
padding: 5px 15px;
font-size: 12px;
border-radius: 4px;
}
.noDraw {
color: #f56c6c;
}
.link {
color: #409eff;
cursor: pointer;
pointer-events: auto;
&:hover {
text-decoration: underline;
}
}
.el-dialog__header {
padding: 20px 0 20px 0px;
border-bottom: 1px solid #eee;
margin: 0 40px;
}
.el-dialog__body {
padding: 30px 40px;
}
.el-dialog__wrapper,
.v-modal {
z-index: 99 !important;
}
.el-tree-node__content {
height: 39px;
}
.el-tree-node__content:hover,
.el-upload-list__item:hover {
background: #e4e8f1;
}
.el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
background: #409eff;
border-radius: 4px;
color: #fff;
}
.td-content {
&.active {
&::before {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
content: "";
background: #68c23a;
z-index: 1;
}
span {
position: relative;
z-index: 9;
color: #fff;
background-color:#116FF5;
padding: 5px 21px;
font-size: 12px;
border-radius: 4px;
}
.color_level_2{
color: #fff;
background-color:#FFC019;
padding: 5px 15px;
font-size: 12px;
border-radius: 4px;
}
.color_level_3{
color: #fff;
background-color:#FF7802;
padding: 5px 15px;
font-size: 12px;
border-radius: 4px;
}
.color_level_4{
color: #fff;
background-color:#E31C21;
padding: 5px 15px;
font-size: 12px;
border-radius: 4px;
}
.noDraw {
color: #F56C6C;
}
.link {
color: #409eff;
cursor: pointer;
pointer-events: auto;
&:hover {
text-decoration: underline;
}
}
.el-dialog__wrapper,.v-modal{
z-index: 99 !important;
}
.el-tree-node__content {
height: 39px;
}
.el-tree-node__content:hover,
.el-upload-list__item:hover {
background: #E4E8F1;
}
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background: #409EFF;
border-radius: 4px;
color: #FFF;
}
.td-content {
&.active {
&::before {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
content: "";
background: #68C23A;
z-index: 1;
}
span {
position: relative;
z-index: 9;
color: #FFF;
}
}
}
}
}
}
.common-box {
width: 100%;
width: 100%;
height: 100%;
padding: 8px;
font-size: 14px;
position: relative;
.model-box {
position: fixed;
inset: 40px 40px 40px 240px;
z-index: 999;
.mask {
position: fixed;
inset: 0;
background: rgba($color: #000000, $alpha: 0.6);
z-index: 10;
}
}
.common-tree-box {
width: 200px;
padding: 20px 10px;
margin-right: 8px;
height: 100%;
padding: 8px;
font-size: 14px;
position: relative;
overflow: hidden;
overflow-y: auto;
background: #fff;
border-radius: 4px;
border: 1px solid #eeeeee;
}
.model-box {
position: fixed;
inset: 40px 40px 40px 240px;
z-index: 999;
.common-content-box {
width: 1px;
height: 100%;
.mask {
position: fixed;
inset: 0;
background: rgba($color: #000000, $alpha: 0.6);
z-index: 10;
}
.search-box {
padding: 20px 20px 0;
background: #ffffff;
border-radius: 4px;
border: 1px solid #eeeeee;
}
.common-tree-box {
width: 200px;
padding: 20px 10px;
margin-right: 8px;
height: 100%;
overflow: hidden;
overflow-y: auto;
background: #FFF;
border-radius: 4px;
border: 1px solid #EEEEEE;
}
.common-content-box {
width: 1px;
height: 100%;
.search-box {
padding: 20px 20px 0;
background: #FFFFFF;
border-radius: 4px;
border: 1px solid #EEEEEE;
}
.table-box {
width: 100%;
height: 1px;
margin-top: 8px;
background: #FFFFFF;
display: flex;
flex-direction: column;
border-radius: 4px;
border: 1px solid #EEEEEE;
padding: 24px 24px 0;
}
.table-box {
width: 100%;
height: 1px;
margin-top: 8px;
background: #ffffff;
display: flex;
flex-direction: column;
border-radius: 4px;
border: 1px solid #eeeeee;
padding: 24px 24px 0;
}
}
}
.sub-title {
width: 100%;
padding: 16px 0;
border-bottom: 1px solid #EEEEEE;
color: #606266;
font-size: 16px;
margin-bottom: 20px;
width: 100%;
padding: 16px 0;
border-bottom: 1px solid #eeeeee;
color: #606266;
font-size: 16px;
margin-bottom: 20px;
}
.sub-table-title {
width: 100%;
padding: 16px 0;
color: #606266;
font-size: 16px;
font-weight: 700;
// margin-bottom: 20px;
width: 100%;
padding: 16px 0;
color: #606266;
font-size: 16px;
font-weight: 700;
// margin-bottom: 20px;
}
.sub-btn-box {
width: 100%;
display: flex;
justify-content: center;
padding: 20px 0;
width: 100%;
display: flex;
justify-content: center;
padding: 20px 0;
}
.tips{
color: #F56C6C;
margin-left: -43px;
margin-bottom: 20px;
margin-top: -10px;
font-size: 20px;
scale:0.5;
.tips {
color: #f56c6c;
margin-left: -43px;
margin-bottom: 20px;
margin-top: -10px;
font-size: 20px;
scale: 0.5;
}

View File

@ -214,7 +214,9 @@ export default class checkResumption extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
if (this.type === 1) {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData()
} else {
this.getReportTableData()

View File

@ -176,7 +176,9 @@ export default class HiddendangerResumption extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -160,7 +160,9 @@ export default class PublicityResumption extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -484,7 +484,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
this.updateParams.verifyUserName = this.$store.getters.user_map[data]
}
if (item && item.key === 'reformDeadline') {
const now = moment().format("YYYY-MM-DD HH");
const now = moment().format("YYYY-MM-DD HH:mm");
if (now > data) {
this.$message.error("要求整改日期不能早于当前时间")
this.updateParams.reformDeadline = null;
@ -496,7 +496,9 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -573,7 +575,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
areaName: (this.areaList.find((item: any) => item.value === res.data.areaId) as any).name,
type: "随手拍",
}, res.data)
this.updateParams.majorHazard = +this.updateParams.majorHazard
this.updateParams.majorHazard = this.updateParams.majorHazard ? +this.updateParams.majorHazard : 0
this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
//
this.center = [res.data.locationLng, res.data.locationLat];
@ -683,6 +685,12 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
this.updateParams.resourceName = this.photoList.map(item => item.name).join(",")
this.updateParams.resourceOtherId = this.fileList.map(item => item.id).join(",")
this.updateParams.resourceOtherName = this.fileList.map(item => item.name).join(",")
for (const attribute in this.updateParams) {
if (this.updateParams[attribute] === undefined) {
this.updateParams[attribute] = null
}
}
this.tableService.addOrUpdate(JSON.parse(JSON.stringify(this.updateParams)), !this.updateParams.id).then(res => {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功");
if (isSubmit) {

View File

@ -42,7 +42,8 @@
@click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" v-if="isBase && !(isClap && scope.row.status)"
@click="showUpdateModel(scope.row)">修改</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="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 && params.type===4 && scope.row.status<5"
@ -65,7 +66,7 @@
:visible.sync="showUpdate" width="980px" :before-close="handleClose" destroy-on-close>
<div class="sub-title" v-if="isManager || isFile">隐患信息</div>
<FormComponent ref="form" :options="updateOptions"
:isReadonly="isReadonly || ((isManager || isFile) && updateParams.status>1)" labelWidth="140px"
:isReadonly="isReadonly || ((isManager || isFile) && updateParams.status>1)" labelWidth="98px"
labelAlign="right" :data.sync="updateParams" @actionCallback="callback" :actions="updateActions"
:full-btn="true" @change="change" btn-position="center"></FormComponent>

View File

@ -630,7 +630,9 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -875,7 +875,9 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -945,7 +947,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
professionClassifyName: this.$store.getters.prevention_major_type_map[row.professionClassify],
reformModeName: this.reformModeMap[row.reformMode],
}, row);
this.updateParams.majorHazard = +this.updateParams.majorHazard
this.updateParams.majorHazard = this.updateParams.majorHazard ? +this.updateParams.majorHazard : 0
this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
this.getTableCallback()
// url

View File

@ -160,7 +160,9 @@ export default class RulesComponent extends BaseRecordComponent<any> {
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -355,7 +355,9 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -485,7 +485,9 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData()
return
}
@ -679,7 +681,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
professionClassifyName: this.$store.getters.prevention_major_type_map[row.professionClassify],
reformModeName: this.reformModeMap[row.reformMode],
}, row)
this.updateParams.majorHazard = +this.updateParams.majorHazard;
this.updateParams.majorHazard = this.updateParams.majorHazard ? +this.updateParams.majorHazard : 0
this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
// url

View File

@ -469,7 +469,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -119,7 +119,9 @@ export default class IntegralCenter extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -131,7 +131,9 @@ export default class IntegralEvent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -410,7 +410,9 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -287,7 +287,9 @@ export default class IntegralExchangeRecord extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -222,7 +222,9 @@ export default class IntegralMall extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -338,6 +340,9 @@ export default class IntegralMall extends BaseRecordComponent<any> {
})
this.updateParams.resourceId = resourceId.join(",")
this.updateParams.resourceName = resourceName.join(",")
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");

View File

@ -209,7 +209,9 @@ export default class IntegralRule extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -345,7 +345,9 @@ export default class MajorHazard extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -483,6 +485,9 @@ export default class MajorHazard extends BaseRecordComponent<any> {
});
this.updateParams.resourceId = resourceId.join(",");
this.updateParams.resourceName = resourceName.join(",");
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
this.updateParams.companyName = this.companyListMap[this.updateParams.companyId]
this.updateParams.techUserName = this.$store.getters.user_map[this.updateParams.techUserId];

View File

@ -311,7 +311,9 @@ export default class MajorHazard extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -429,6 +431,9 @@ export default class MajorHazard extends BaseRecordComponent<any> {
});
this.updateParams.resourceId = resourceId.join(",");
this.updateParams.resourceName = resourceName.join(",");
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
this.updateParams.companyName = this.companyListMap[this.updateParams.companyId]
this.updateParams.techUserName = this.$store.getters.user_map[this.updateParams.techUserId];

View File

@ -340,7 +340,9 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -229,7 +229,9 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -423,6 +425,9 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
});
this.updateParams.resourceId = resourceId.join(",");
this.updateParams.resourceName = resourceName.join(",");
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
let tmpContent = {} as any;
tmpContent.content = this.estimateStandard;

View File

@ -111,7 +111,7 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
created() {
//
//
}
public buildFormOptions() {
@ -345,7 +345,9 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -113,7 +113,9 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
public callback(data, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -386,7 +386,9 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -250,7 +250,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
labelWidth: '140px',
datas: this.$store.state.prevention_risk_level
}, {
name: "是否为两大一重",
name: "是否为两一大",
key: "majorSign",
format: "majorSignName",
type: "checkbox",
@ -566,7 +566,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -678,7 +680,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
//
this.initDeviceParamMethod(diviceData);
}
//
//
//
if (item && item.key === 'majorSign') {
if (!data) {

View File

@ -438,7 +438,9 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
*/
public callback(data: any, type?) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -687,6 +689,8 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
opacity: 0.3;
}
.end-step {}
.description {
@ -736,6 +740,10 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
border-radius: 50%;
margin-left: 2px;
margin-bottom: 6px;
.el-step__icon-inner {
display: none;
}
}
}

View File

@ -243,7 +243,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
require: true,
showError: false,
format: "yyyy-MM-dd",
disable:true,
disable: true,
}, {
name: "区域固有风险等级",
key: "analRiskLevel",
@ -256,7 +256,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
disable: true,
datas: this.$store.state.prevention_risk_level
}, {
name: "是否为两大一重",
name: "是否为两一大",
key: "majorSign",
format: "majorSignName",
type: "checkbox",
@ -574,7 +574,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -692,7 +694,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
//
this.initJobParamMethod(jobData)
}
//
//
//
if (item && item.key === 'majorSign') {
if (!data) {
@ -1154,6 +1156,10 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
border-radius: 50%;
margin-left: 2px;
margin-bottom: 6px;
.el-step__icon-inner {
display: none;
}
}
}

View File

@ -329,7 +329,9 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -374,6 +376,9 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
return item.id
})
this.updateParams.resourceId = resourceId.join(",")
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
this.$store.state.userList.map((item) => {

View File

@ -247,7 +247,9 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -358,7 +358,9 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -156,7 +156,9 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -325,7 +325,9 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -223,14 +223,14 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
type: "select",
require: true,
datas: this.areaList,
showError:false,
showError: false,
}, {
name: "区域编号",
key: "areaNo",
type: "text",
disable: true,
width: "calc(50% - 20px)",
showError:false,
showError: false,
}, {
name: "单元编号",
key: "number",
@ -238,14 +238,14 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
disable: true,
width: "calc(50% - 20px)",
require: true,
showError:false,
showError: false,
}, {
name: "单元名称",
key: "name",
type: "text",
width: "calc(50% - 20px)",
require: true,
showError:false,
showError: false,
}, {
name: "责任部门",
key: "chargeDeptId",
@ -264,7 +264,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
datas: this.$store.state.userList,
showError:false,
showError: false,
}, {
type: "btn",
name: "单元绘制",
@ -295,7 +295,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
type: "select",
disable: this.currentId != -1,
require: true,
showError:false,
showError: false,
datas: [{
name: "启用",
value: 1,
@ -380,9 +380,9 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
}
public getAreaList(){
this.areaService.selectByPage({pageSize:1000}).then((res:any)=>{
this.areaList = res.data.datas.map(item=>{
public getAreaList() {
this.areaService.selectByPage({ pageSize: 1000 }).then((res: any) => {
this.areaList = res.data.datas.map(item => {
this.areaNoMap[item.id] = item.number;
return {
name: item.name,
@ -436,7 +436,9 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
}
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -376,7 +376,7 @@ export default class BusinessInfo extends BaseRecordComponent<any> {
datas: this.$store.state.prevention_safety_label,
},
{
name: "两大一重情况",
name: "两一大情况",
key: "majorSign",
format: "majorSignName",
type: "checkbox",
@ -488,7 +488,9 @@ export default class BusinessInfo extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -836,7 +838,7 @@ export default class BusinessInfo extends BaseRecordComponent<any> {
}
public changes(data, item) {
//
//
//
if (item && item.key === 'majorSign') {
if (!data) {

View File

@ -356,7 +356,9 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -442,7 +442,9 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -301,7 +301,9 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}

View File

@ -354,7 +354,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -467,7 +469,7 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
}
public onRemove(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 onPreview(file) {
@ -536,6 +538,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
})
this.updateParams.resourceId = resourceId.join(",")
this.updateParams.resourceName = resourceName.join(",")
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
this.setpsOptions.forEach((item, index) => {

View File

@ -350,7 +350,9 @@ export default class RiskCard extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -456,7 +458,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
}
public onRemove(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 onPreview(file) {

View File

@ -279,7 +279,9 @@ export default class SafeCard extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -385,7 +387,7 @@ export default class SafeCard extends BaseRecordComponent<any> {
}
public onRemove(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 onPreview(file) {

View File

@ -329,7 +329,9 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -392,12 +394,14 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
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(",")
} else {
this.updateParams.resourceId = ''
this.updateParams.resourceName = ''
}
//
this.updateParams.chargeUserName = this.$store.getters.user_map[this.updateParams.chargeUserId];
@ -687,8 +691,8 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
});
}
/**
* 清除附件数据
*/
* 清除附件数据
*/
public clearFileListMethod() {
this.fileList = [];
const option = this.updateOptions.find(item => item.key === "resourceId") as any;

View File

@ -278,7 +278,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
if (data.status === 1) {
return `<span class="color_1">${'在用'}</span>`
} else if (data.status === 0) {
return `<span class="color_0">${'废'}</span>`
return `<span class="color_0">${'废'}</span>`
}
}
});
@ -288,7 +288,9 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -348,6 +350,8 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
public handleClose() {
this.subShowUpdate = false;
//
this.clearFileListMethod();
}
@ -393,7 +397,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
}
public onRemove(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 onPreview(file) {
@ -415,7 +419,9 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
public triCallback(data) {
if (data.value === "cancel") {
this.subShowUpdate = false
this.subShowUpdate = false;
//
this.clearFileListMethod();
} else if (data && data.value.indexOf("save") >= 0) {
this.doSave(data.value !== "save")
}
@ -441,7 +447,8 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
this.subUpdateParams = {} as any
this.subShowUpdate = !!goOn;
this.getTableData();
//
this.clearFileListMethod();
if (goOn === true) {
this.getNumber()
}
@ -461,7 +468,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
if (res.code === 200) {
this.subUpdateParams = res.data
if (isReadonly) {
this.subUpdateParams.statusName = res.data.status == 1 ? '在用' : '废'
this.subUpdateParams.statusName = res.data.status == 1 ? '在用' : '废'
}
if (res.data.resourceId) {
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
@ -543,7 +550,14 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
window.URL.revokeObjectURL(href); // blob
});
}
/**
* 清除附件数据
*/
public clearFileListMethod() {
this.fileList = [];
const option = this.subUpdateOptions.find(item => item.key === "resourceId") as any;
option.fileList = [];
}
}
</script>

View File

@ -305,7 +305,9 @@ export default class Programme extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}
@ -357,6 +359,7 @@ export default class Programme extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public showUpdateModel(id) {
@ -365,6 +368,8 @@ export default class Programme extends BaseRecordComponent<any> {
public handleClose() {
this.subShowUpdate = false;
//
this.clearFileListMethod();
}
@ -410,7 +415,7 @@ export default class Programme extends BaseRecordComponent<any> {
}
public onRemove(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 onPreview(file) {
@ -432,7 +437,9 @@ export default class Programme extends BaseRecordComponent<any> {
public triCallback(data) {
if (data.value === "cancel") {
this.subShowUpdate = false
this.subShowUpdate = false;
//
this.clearFileListMethod();
} else if (data && data.value.indexOf("save") >= 0) {
this.doSave(data.value !== "save")
}
@ -458,7 +465,8 @@ export default class Programme extends BaseRecordComponent<any> {
this.subUpdateParams = {} as any
this.subShowUpdate = !!goOn;
this.getTableData();
//
this.clearFileListMethod();
if (goOn === true) {
this.getNumber()
}
@ -559,7 +567,14 @@ export default class Programme extends BaseRecordComponent<any> {
window.URL.revokeObjectURL(href); // blob
});
}
/**
* 清除附件数据
*/
public clearFileListMethod() {
this.fileList = [];
const option = this.subUpdateOptions.find(item => item.key === "resourceId") as any;
option.fileList = [];
}
}
</script>
<style lang="scss" scoped src="../common.component.scss"></style>

View File

@ -401,7 +401,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
this.params[type] = data;
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
return
}