feat:修复隐患积分bug

dev
kongyeqing 2023-09-14 14:22:09 +08:00
parent 1b7a1eaf53
commit f573d9a3ae
30 changed files with 307 additions and 132 deletions

View File

@ -284,6 +284,7 @@ export default class AnalEvaluationComponent extends Vue {
datas: this.$store.state.prevention_serious_result,
filterable: true,
showError: false,
clearable:true,
},
{
name: "危害分析",
@ -304,6 +305,7 @@ export default class AnalEvaluationComponent extends Vue {
datas: this.$store.state.prevention_security_identifier,
filterable: true,
showError: false,
clearable:true,
},
{
name: "设置复评时间",
@ -314,6 +316,11 @@ export default class AnalEvaluationComponent extends Vue {
require: true,
showError: false,
format: "yyyy-MM-dd",
pickerOptions: {
disabledDate(time) {
return time.getTime() < moment(new Date()).add(1, 'month').subtract(1, 'day').toDate().getTime();
}
}
},
];
} else {
@ -382,6 +389,7 @@ export default class AnalEvaluationComponent extends Vue {
datas: this.$store.state.prevention_serious_result,
filterable: true,
showError: false,
clearable:true,
},
{
name: "危害分析",
@ -402,6 +410,7 @@ export default class AnalEvaluationComponent extends Vue {
datas: this.$store.state.prevention_security_identifier,
filterable: true,
showError: false,
clearable:true,
},
{
name: "设置复评时间",

View File

@ -599,6 +599,17 @@ export default class MeasureComponent extends Vue {
})
this.taskUpdataParams.taskItemName = map[data]
}
//
if (item && item.key === 'reviewCycleUnit') {
const option = this.taskUpdateOptions.find(item => item.key === "startTime") as any;
option.hide = data === 7 ? false : true;
const optionEnd = this.taskUpdateOptions.find(item => item.key === "endTime") as any;
optionEnd.hide = data === 7 ? false : true
if (data !== 7) {
this.taskUpdataParams.startTime = '';
this.taskUpdataParams.endTime = ''
}
}
//
if (item && item.key === 'executeStartTime') {
const now = moment().format("YYYY-MM-DD HH:mm:ss");

View File

@ -7,7 +7,7 @@ export default class AreaService extends BaseService<any>{
}
// 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/area/analList';
const url = this.prefix.prevention+'/risk/area/list';
return this.get(url,params,true)
}
// 批量删除

View File

@ -0,0 +1,43 @@
import BaseService from "hbt-common/service/base.service"
import type { AxiosResponse } from 'axios'
import { ActionResult } from "hbt-common/models/actionResult";
export default class AreaAnalService extends BaseService<any>{
constructor(){
super()
}
// 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/area/analList';
return this.get(url,params,true)
}
// 批量删除
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/area';
return this.deleteBatch(url,params,{},true)
}
public getAreaNumber():Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/area/number';
return this.get(url,null)
}
public getQrCode(params){
const url = this.prefix.file+'/qrCode/createQrCode';
return this.post(url,params)
}
// 新增或更新
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/area';
if(add){
return this.post(url,params,{},showLoading)
}else{
return this.put(url,params,{},showLoading)
}
}
public getAnalControls():Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/identifyinventory/getAnalControls';
return this.get(url,null,false)
}
}

View File

@ -84,6 +84,15 @@
height: 39px;
}
.el-dialog__headerbtn .el-dialog__close {
color: rgb(0 0 0 / 60%);
font-size: 28px;
}
.el-dialog__headerbtn {
right: 34px;
}
.el-tree-node__content:hover,
.el-upload-list__item:hover {
background: #e4e8f1;

View File

@ -145,34 +145,42 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
public getTableCallback() {
this.formOptions = [{
name: "隐患等级",
key: "level",
type: "select",
datas: [{
name: "一般隐患",
value: 1
this.formOptions = [
{
name: "隐患分类",
key: "classify",
type: "select",
datas: this.$store.state.prevention_dangrous_type
}, {
name: "重大隐患",
value: 2
}]
}, {
name: "隐患分类",
key: "classify",
type: "select",
datas: this.$store.state.prevention_dangrous_type
}, {
name: "整改方式",
key: "reformMode",
type: "select",
datas: [{
name: "即查即改",
value: 1
name: "隐患来源",
key: "source",
type: "select",
datas: this.$store.state.prevention_danger_resource
}, {
name: "限期整改",
value: 2
}]
}]
name: "隐患等级",
key: "level",
type: "select",
datas: [{
name: "一般隐患",
value: 1
}, {
name: "重大隐患",
value: 2
}]
},
// {
// name: "",
// key: "reformMode",
// type: "select",
// datas: [{
// name: "",
// value: 1
// }, {
// name: "",
// value: 2
// }]
// }
]
this.updateOptions = [{
name: "隐患编号",
@ -630,7 +638,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
public callback(data, type?) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
@ -697,7 +705,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
reformModeName: this.reformModeMap[row.reformMode],
}, row);
this.updateParams.majorHazard = +this.updateParams.majorHazard
this.updateParams.majorHazardName = !this.updateParams.majorHazard? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard]
this.getTableCallback()
// url
if (row.resourceId) {

View File

@ -266,7 +266,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
key: "description",
require: true,
showError: false,
type: "text"
type: "textarea"
}, {
name: "隐患级别",
key: "level",
@ -553,7 +553,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
key: "realConfirmTime",
format: "yyyy-MM-dd HH:mm",
showError: false,
disable:true,
disable: true,
pickerOptions: this.getPickerOptions(this.updateParams.createTime),
}]
this.updateOptions3 = [{
@ -875,7 +875,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
public callback(data, type?) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
@ -1066,7 +1066,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
this.updateParams.verifyResourceId = this.photoList2.map(item => item.id).join(",")
this.updateParams.verifyResourceName = this.photoList2.map(item => item.name).join(",")
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => {
this.$message.success(!this.updateParams.id ? "新增成功" : "提交成功");
this.$message.success(!this.updateParams.id ? (isSubmit ? "提交成功" : '保存草稿成功') : "提交成功");
if (!preStatus) {
if (isSubmit) {
this.startWorkFlow(this.updateParams.id || res.data, [this.updateParams.reformUserId])

View File

@ -182,7 +182,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: this.areaList
datas: this.areaList,
clearable:true,
}, {
name: "适用单元",
key: "units",
@ -191,7 +192,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: this.unitList
datas: this.unitList,
clearable:true,
}, {
name: "适用对象",
key: "targets",
@ -201,6 +203,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
require: true,
showError: false,
datas: this.$store.state.analControlList,
clearable:true,
}, {
name: "适用部门",
key: "depts",
@ -209,7 +212,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: this.$store.state.deptList
datas: this.$store.state.deptList,
clearable:true,
}, {
name: "适用类型",
key: "types",
@ -218,7 +222,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
require: true,
multiple: true,
showError: false,
datas: this.$store.state.prevention_dangrous_type
datas: this.$store.state.prevention_dangrous_type,
clearable:true,
}]
this.updateActions = [{
name: "取消",

View File

@ -192,7 +192,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
key: "planName",
type: "text",
}, {
name: "检查项目",
name: "检查类型",
key: "inspectType",
type: "select",
datas: this.$store.state.prevention_danger_check_type

View File

@ -120,7 +120,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
type: "primary"
}, {
name: "保存并继续添加",
hide:false,
hide: false,
value: "saveAndContinue",
type: "primary"
}];
@ -239,7 +239,8 @@ export default class PlanComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: this.areaList
datas: this.areaList,
clearable: true,
}, {
name: "检查单元",
key: "unitIds",
@ -249,7 +250,8 @@ export default class PlanComponent extends BaseRecordComponent<any> {
require: true,
multiple: true,
showError: false,
datas: this.unitList
datas: this.unitList,
clearable: true,
}, {
name: "检查对象",
key: "analControlIds",
@ -259,6 +261,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
require: true,
multiple: true,
showError: false,
clearable: true,
datas: this.$store.state.analControlList,
}, {
name: "计划检查时间",
@ -270,6 +273,11 @@ export default class PlanComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() < moment(new Date()).subtract(1, 'day').toDate().getTime();
}
}
}, {
name: "计划检查时间",
key: "time",
@ -280,6 +288,11 @@ export default class PlanComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() < moment(new Date()).subtract(1, 'day').toDate().getTime();
}
}
}, {
name: "检查负责人",
key: "chargeUserId",
@ -321,6 +334,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
width: "600px",
multiple: true,
showError: false,
clearable: true,
datas: res.data.datas.map(item => {
return {
name: item.name,
@ -389,7 +403,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
this.tableColumn.push({
name: '状态', filters: this.filters, filterMethod: (data, row) => {
return row.state === data && row.planType == 2
}, render: (data) => {
}, render: (data) => {
return data.planType == 1 ? "--" : `<span class="color_${data.state}">${this.stateMap[data.state]}</span>`
}
});
@ -450,13 +464,29 @@ export default class PlanComponent extends BaseRecordComponent<any> {
this.updateParams.chargeUserName = this.$store.getters.user_map[data]
}
if (item && item.key === "inspectCycleValue") {
console.log(data)
this.updateParams.inspectCycleValue = data;
setTimeout(() => {
this.updateParams.inspectCycleValue = Math.floor(data)
})
}
if (item && item.key === "startTime") {
const now = moment().format("YYYY-MM-DD HH:mm:ss")
if (data < now) {
this.$message.error("计划检查时间不能早于当前时间,请先修改数据");
this.updateParams.startTime = null;
return
}
}
if (item && item.key === "time") {
const now = moment().format("YYYY-MM-DD HH:mm:ss")
if (data[0] < now || data[1] < now) {
this.$message.error("计划检查时间不能早于当前时间,请先修改数据");
this.updateParams.time = null
this.updateParams.startTime = null
this.updateParams.endTime = null
return
}
if (data && data.length) {
this.updateParams.startTime = data[0]
this.updateParams.endTime = data[1]
@ -469,7 +499,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
@ -491,8 +521,8 @@ export default class PlanComponent extends BaseRecordComponent<any> {
this.showUpdateModel()
} else if (data && data.value === "delete") {
this.deleteData(this.selectData.map((item: any) => item.id))
} else if (data && data.value.indexOf("save")>=0 ) {
this.doSave(data.value==="save")
} else if (data && data.value.indexOf("save") >= 0) {
this.doSave(data.value === "save")
} else if (data && data.value === "cancel") {
this.handleClose()
}
@ -562,7 +592,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
this.updateParams.startTime = row.startTime
}
} else {
this.updateParams = { planType: 1 , time :[]} as any;
this.updateParams = { planType: 1, time: [] } as any;
}
this.buildUpdateForm();
this.showUpdate = true
@ -570,7 +600,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
//
public openSendModel(row) {
const now = moment().format("YYYY-MM-DD HH:mm")
const now = moment().format("YYYY-MM-DD HH:mm:ss")
if (row.startTime < now) {
this.$message.error("检查开始时间不能早于当前时间,请先修改数据");
return
@ -662,7 +692,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
name: this.$store.getters.prevention_anal_control_map[itm]
}
})
const now = moment().format("YYYY-MM-DD HH:mm")
const now = moment().format("YYYY-MM-DD HH:mm:ss")
if (this.updateParams.startTime < now) {
this.$message.error("检查开始时间不能早于当前时间");
return
@ -679,14 +709,22 @@ export default class PlanComponent extends BaseRecordComponent<any> {
}
public changeState(row) {
this.tableService.addOrUpdate({
id: row.id,
state: +!row.state,
oldState: row.state
}, false).then(res => {
this.$message.success(row.state ? "停用成功" : "启用成功!")
this.getTableData();
this.$confirm(`确认${row.state ? '停用' : '启用'}此安全检查计划`, "确认数据", {
type: 'warning'
}).then(() => {
this.tableService.addOrUpdate({
id: row.id,
state: +!row.state,
oldState: row.state
}, false).then(res => {
this.$message.success(row.state ? "停用成功" : "启用成功!")
this.getTableData();
})
}).catch(() => {
//
})
}

View File

@ -11,8 +11,8 @@
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
@selection-change="handleSelectionChange" style="width: 100%" @sort-change="sortChange($event)">
<el-table-column v-if="isPlan" type="selection"
:selectable="selectable" fixed label="全选" width="40">
<el-table-column v-if="isPlan" type="selection" :selectable="selectable" fixed label="全选"
width="40">
</el-table-column>
<el-table-column label="序号" width="60">
<div slot-scope="scope">{{scope.$index+1}}</div>
@ -31,22 +31,24 @@
</template>
<el-table-column label="操作" fixed="right" :width="tableActionWidth">
<template slot-scope="scope">
<el-button type="text" v-if="isPlan" @click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" v-if="isPlan"
@click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" v-if="isPlan"
:disabled="(scope.row.planType === 1 && scope.row.status===1) || (scope.row.planType === 2 && scope.row.state===1)"
@click="showUpdateModel(scope.row)">修改</el-button>
<el-button type="text" v-if="isPlan"
:disabled="(scope.row.planType === 1 && scope.row.status===1) || (scope.row.planType === 2 && scope.row.state===1)"
@click="deleteData([scope.row.id])">删除</el-button>
<el-button type="text" v-if="isPlan && !scope.row.status" :disabled="scope.row.planType===2 && scope.row.state===0"
<el-button type="text" v-if="isPlan && !scope.row.status"
:disabled="scope.row.planType===2 && scope.row.state===0"
@click="openSendModel(scope.row)">下发</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType===2 && !scope.row.state"
@click="changeState(scope.row)">启用</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state"
@click="changeState(scope.row)">停用</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType===1" @click="openRecordModel(scope.row)">检查情况</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType===2 " @click="openRecordModel(scope.row)">最新检查情况</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType===1"
@click="openRecordModel(scope.row)">检查情况</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType===2 "
@click="openRecordModel(scope.row)">最新检查情况</el-button>
<el-button type="text" v-if="isAction && scope.row.status !==4&& (scope.row.status !==2 &&(nowDate > scope.row.taskStartTime ? true :
false) ) && scope.row.tag===0 " @click="openRecordModel(scope.row)">检查</el-button>
</template>
@ -58,8 +60,8 @@
</div>
<!-- 检查表记录 -->
<el-dialog :close-on-click-modal="false" :title="isPlan?'检查表记录':'检查表'"
:visible.sync="showRecord" width="1080px" :before-close="handleClose" destroy-on-close>
<el-dialog :close-on-click-modal="false" :title="isPlan?'检查表记录':'检查表'" :visible.sync="showRecord" width="1080px"
:before-close="handleClose" destroy-on-close>
<div class="full">
<el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
<el-radio-button :label="item.id" v-for="item in tableTabs"
@ -111,7 +113,7 @@
</el-table>
</div>
<div class="sub-title" v-if="!hideActions">隐患登记情况</div>
<div class="full" style="margin-bottom: 20px;" 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="danger" plain @click="callback({value:'delete'})" icon="el-icon-delete">批量删除</el-button>
</div>
@ -171,8 +173,7 @@
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':!updateParams.id?'新增':'编辑'"
:visible.sync="showUpdate" width="1050px" :before-close="handleClose" destroy-on-close>
<FormComponent ref="form" :options="updateOptions"
:isReadonly="isReadonly" labelWidth="140px"
<FormComponent ref="form" :options="updateOptions" :isReadonly="isReadonly" labelWidth="140px"
labelAlign="right" :data.sync="updateParams" @actionCallback="callback" :actions="updateActions"
:full-btn="true" @change="change" btn-position="center"></FormComponent>
</el-dialog>

View File

@ -158,6 +158,7 @@ export default class IntegralCenter extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public handleClose() {

View File

@ -2,7 +2,7 @@
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="callback($event)" btn-position="end"></FormComponent>
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"

View File

@ -82,7 +82,8 @@ export default class IntegralEvent extends BaseRecordComponent<any> {
name: "时间",
key: "createTime",
type: "date",
format: 'yyyy-MM-dd'
subType: "datetimerange",
format: 'yyyy-MM-dd HH:mm:ss'
}];
public subActions = [{
@ -111,6 +112,7 @@ export default class IntegralEvent extends BaseRecordComponent<any> {
created() {
//
}
@ -129,10 +131,12 @@ export default class IntegralEvent extends BaseRecordComponent<any> {
}
public callback(data, type) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
} else if (type.key === "createTime") {
this.params.startTime = data ? data[0] : null;
this.params.endTime = data ? data[1] : null;
}
this.getTableData();
return

View File

@ -206,7 +206,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
key: "applyTime",
require: true,
width: "calc(50% - 20px)",
format: "yyyy-MM-dd",
format: "yyyy-MM-dd HH:mm:ss",
disable: true,
},
{
@ -276,7 +276,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
require: true,
width: "calc(50% - 20px)",
disable: true,
format: 'yyyy-MM-dd',
format: 'yyyy-MM-dd HH:mm:ss',
showError: false,
},
]
@ -302,7 +302,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
disable: true,
showError: false,
hide:this.subIsReadonly,
hide: this.subIsReadonly,
}, {
name: "单价/积分",
type: "number",
@ -410,7 +410,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
@ -443,11 +443,10 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
//
public getJudgeIsIntegral() {
this.tableService.judgeIsIntegral().then((res: any) => {
if (res.data === true) {
if (res.data === 1) {
this.getUserIntegral()
} else {
this.$message.error("您有未完成的积分兑换");
this.$message.error(res.data === 2 ? "您有未完成的积分兑换" : '您的积分不足,无法进行兑换');
return
}
})
@ -469,7 +468,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.updateParams.originalPoints = datas.totalPoints ? datas.totalPoints : 0;
this.updateParams.consumePoints = 0;
this.updateParams.residuePoints = datas.totalPoints ? datas.totalPoints : 0;
this.updateParams.applyTime = moment().format('YYYY-MM-DD')
this.updateParams.applyTime = moment().format('YYYY-MM-DD HH:mm:ss')
this.isReadonly = false;
this.buildUpdateForm();
this.showUpdate = true;
@ -646,10 +645,12 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
if (this.subUpdateParams.exchangeNumber > res.data.stockNumber) {
this.$message.error("您的兑换数量不能超出库存");
this.subUpdateParams.exchangeNumber = null;
this.subUpdateParams.remainStock = null;
}
this.countStockAndIntegral(res.data.stockNumber, res.data.goodsPrice, this.subUpdateParams.exchangeNumber)
} else {
this.subUpdateParams.remainStock = null;
}
this.buildSubUpdateForm()
})
}
@ -669,7 +670,6 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
//
//
public countStockAndIntegral(totalNumber, price, number) {
let consumePoint = price * number;
if (consumePoint > this.updateParams.residuePoints) {
this.$message.error("您的兑换积分不足");
@ -686,7 +686,6 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
}
public doSubSave(goOn) {
//
if (this.subShowUpdate) {
if (!this.subUpdateParams.exchangeNumber) {
@ -786,7 +785,7 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.updateParams.approvalUserId = this.account.userId;
this.updateParams.approvalUserName = this.account.nickName;
this.updateParams.approvalTime = moment().format('YYYY-MM-DD');
this.updateParams.approvalTime = moment().format('YYYY-MM-DD HH:mm:ss');
this.buildApplyForm()
}
@ -797,7 +796,6 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
this.updateParams.approvalResultName = this.updateParams.approvalResult === 1 ? '同意' : '不同意'
this.buildApplyForm()
}
this.buildUpdateForm()
this.showUpdate = true
}
@ -822,34 +820,47 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
if (!type) {
this.tableService.getListDetail({ id: data.id }).then((res: any) => {
if (res.code === 200) {
this.updateParams = res.data
this.updateParams = JSON.parse(JSON.stringify(res.data))
this.updateParams.approvalResultName = this.updateParams.approvalResult === 1 ? '同意' : '不同意'
this.updateParams.pointExchangeDetails.forEach((item, index) => {
item.index = index + 1
if (data.status === 1) {
if (this.updateParams.pointExchangeDetails.length !== 0) {
this.updateParams.pointExchangeDetails.forEach((item, index) => {
item.index = index + 1
})
}
if (data.status === 1) {
this.operate = true;
this.isApplyReadonly = true;
this.isReadonly = true;
this.buildApplyForm()
} else if (data.status === 2) {
this.isReadonly = true;
if (this.updateParams.approvalResult || this.updateParams.approvalResult === 0) {
this.operate = true;
this.isApplyReadonly = true;
this.isReadonly = true;
this.buildApplyForm()
} else if (data.status === 2) {
this.isReadonly = true;
if (this.updateParams.approvalResult || this.updateParams.approvalResult === 0) {
this.operate = true;
this.isApplyReadonly = true;
this.buildApplyForm()
} else {
this.operate = false;
this.isApplyReadonly = false;
}
} else {
this.operate = true;
this.isApplyReadonly = true;
this.isReadonly = true;
this.buildApplyForm()
this.operate = false;
this.isApplyReadonly = false;
}
this.showUpdate = true
this.buildUpdateForm()
})
} else if (data.status === 4) {
this.operate = false;
this.isApplyReadonly = true;
this.isReadonly = true;
this.buildApplyForm()
} else {
// if (this.updateParams.approvalResult === null || this.updateParams.approvalResult === undefined) {
// this.operate = false;
// } else {
// this.operate = true;
// }
this.operate = true;
this.isApplyReadonly = true;
this.isReadonly = true;
this.buildApplyForm()
}
this.showUpdate = true
this.buildUpdateForm()
}
})
} else {

View File

@ -119,6 +119,11 @@ export default class IntegralMall extends BaseRecordComponent<any> {
key: "stockNumber",
require: true,
width: "calc(50% - 20px)",
// rules: [
// { pattern: /^1[3|5|7|8|9]\d{9}$/, message: '', }
// ],
max: 99999,
min: 1
},
{
name: "单位",
@ -222,7 +227,7 @@ export default class IntegralMall extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();

View File

@ -69,7 +69,7 @@
<el-dialog :close-on-click-modal="false" v-if="!isArea" width="500px" :title="'停用/恢复登记'"
:visible.sync="showTurnOff">
<FormComponent :options="turnOffForm" labelWidth="110px" labelAlign="right" :data.sync="turnOffParams"
@actionCallback="doTurnOffAction" :actions="turnOffAction" btn-position="center">
@actionCallback="doTurnOffAction" :actions="turnOffAction" btn-position="center" @change="change">
</FormComponent>
</el-dialog>
</div>

View File

@ -5,7 +5,7 @@ import template from "./areaAnal.component.html"
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
import FormComponent from "hbt-common/components/common/form.component.vue"
import TableComponent from "hbt-common/components/common/table.component.vue"
import AreaService from "@/service/area.service"
import AreaAnalService from "@/service/areaanal.service"
import FormOption from "hbt-common/models/formOptions"
import BtnOption from "hbt-common/models/btnOptions"
import DrawComponent from '@/components/draw.component.vue';
@ -23,7 +23,7 @@ import riskLevel from '@/mock/riskLevel'
},
})
export default class AreaAnalComponent extends BaseRecordComponent<any> {
public tableService = new AreaService();
public tableService = new AreaAnalService();
public params = {} as any;

View File

@ -96,14 +96,16 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
value: "reverse"
}];
public formOptions: FormOption<BtnOption>[] = [{
name: "区域名称",
key: "areaName",
name: "设备名称",
key: "name",
type: "text",
}, {
name: "单元名称",
key: "unitName",
type: "text",
}];
name: "设备类别",
key: "type",
type: "select",
datas: this.$store.state.prevention_device_type,
clearable: true,
},];
public updateOptions: FormOption<BtnOption>[] = [] as any;
@ -170,6 +172,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
showError: false,
type: "select",
width: "100%",
clearable: true,
datas: this.$store.state.postList
}, {
name: "安全因素",
@ -178,6 +181,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
require: true,
type: "select",
multiple: true,
clearable: true,
width: "calc(50% - 20px)",
showError: false,
datas: this.$store.state.prevention_safe_reason
@ -386,7 +390,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
if (type === 'pageSize' || type === 'pageNum') {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData();
@ -428,6 +432,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
//

View File

@ -126,13 +126,15 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
}];
public formOptions: FormOption<BtnOption>[] = [{
name: "区域名称",
key: "areaName",
name: "设备名称",
key: "name",
type: "text",
}, {
name: "单元名称",
key: "unitName",
type: "text",
name: "设备类别",
key: "type",
type: "select",
datas:this.$store.state.prevention_device_type,
clearable:true,
},];
public showUpdate = false;

View File

@ -222,6 +222,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
multiple: true,
width: "calc(50% - 20px)",
require: true,
clearable:true,
datas: this.$store.state.postList
}, {
name: "安全因素",
@ -229,6 +230,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
format: "safetyFactorName",
type: "select",
multiple: true,
clearable:true,
width: "calc(50% - 20px)",
require: true,
showError: false,
@ -689,8 +691,6 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
opacity: 0.3;
}
.end-step {}
.description {

View File

@ -5,7 +5,7 @@
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="changes" btn-position="end"></FormComponent>
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"

View File

@ -117,6 +117,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
require: true,
multiple: true,
width: "calc(50% - 20px)",
clearable:true,
datas: this.$store.state.prevention_serious_result,
},
{
@ -134,6 +135,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
require: true,
multiple: true,
width: "calc(50% - 20px)",
clearable:true,
datas: this.$store.state.prevention_security_identifier,
},
{
@ -386,6 +388,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
//

View File

@ -158,7 +158,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}
});
this.tableColumn.push({
name: '来源', key: "type", render: (data) => {
name: '数据来源', key: "type", render: (data) => {
return this.sourceType[data.type]
}
});

View File

@ -420,6 +420,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
}
public change(data, item) {
console.log('data');
//
if (item && item.key === "chargeDeptId") {
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
@ -433,6 +435,21 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
this.updateParams.areaNo = this.areaNoMap[data];
this.getCreateNumber({ areaNo: this.updateParams.areaNo })
}
//
if (item && item.key === 'startTime') {
if (this.turnOffParams.endTime) {
if (data > this.turnOffParams.endTime) {
this.turnOffParams.endTime = null
}
}
}
//
if (item && item.key === 'endTime') {
if (data < this.turnOffParams.startTime) {
this.$message.warning('停用结束时间应大于停用开始时间');
this.turnOffParams.endTime = null
}
}
}
public callback(data, type) {
if (type) {
@ -481,6 +498,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}

View File

@ -208,6 +208,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
datas: this.$store.state.prevention_security_identifier,
filterable: true,
multiple: true,
clearable:true,
},
{
name: "风险管控措施",

View File

@ -336,6 +336,7 @@ export default class SafeCard extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public showUpdateModel(id) {

View File

@ -44,7 +44,7 @@
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':updateParams.id?'编辑': '新增'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
:visible.sync="showUpdate" width="1000px" :before-close="handleClose" destroy-on-close>
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
:isReadonly="isReadonly" @actionCallback="subCallback" @change="changes" :actions="updateActions"
:full-btn="true" btnPosition="center">

View File

@ -323,7 +323,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
this.subTableColumn.push({ name: '姓名', key: "userName", });
this.subTableColumn.push({ name: '单位', key: "deptName", });
this.subTableColumn.push({ name: '职务', key: "duty", });
this.subTableColumn.push({ name: '联系方式', key: "phone" });
this.subTableColumn.push({ name: '联系方式', key: "phone",width:"130px" });
this.subTableColumn.push({ name: '职责描述', key: "description", width: "250px", showTip: true, });
}

View File

@ -283,7 +283,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
}
});
this.tableColumn.push({ name: '编制人', key: "compileUserName" });
this.tableColumn.push({ name: '编制时间', key: "compileTime" });
this.tableColumn.push({ name: '编制时间', key: "compileTime",width:"110px" });
}
public callback(data, type) {