feat:更新到线上环境,依据测试进行优化

dev
kongyeqing 2023-07-26 17:29:47 +08:00
parent 64b7afc5a1
commit 405c549834
19 changed files with 448 additions and 372 deletions

View File

@ -1,4 +1,4 @@
#生产环境
#开发环境
NODE_ENV:"production"
# 页面标题
VUE_APP_TITLE = 汉邦唐全真数字服务平台
@ -7,10 +7,13 @@ VUE_APP_GATEWAY_URL="/prod-api"
# 服务地址
VUE_APP_BASE_API_URL=""
# 服务前-- 请严格遵守格式 不允许换行
VUE_APP_SERVICE_PREFIX= '{"knowledge":"/knowledge","system":"/system"}'
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file","prevention":"/prevention","bpm":"/bpm"}'
# 是否显示全部菜单
VUE_APP_ALL_MENU = false
# 微前端地址
# # 微前端地址
# VUE_APP_REMOTES_URL="http://192.168.1.20:8090"
# # 当前应用部署地址
# VUE_APP_EXPOSES_URL="http://192.168.1.20:8090"
VUE_APP_REMOTES_URL="http://119.45.158.12/common/"
# 当前应用部署地址
VUE_APP_EXPOSES_URL=""
VUE_APP_EXPOSES_URL="/prevention"

View File

@ -278,7 +278,7 @@ export default class AnalEvaluationComponent extends Vue {
{
name: "危害分析",
key: "hazardAnalysis",
type: "text",
type: "textarea",
require: true,
width: "calc(100% - 20px)"
},

View File

@ -31,8 +31,8 @@
</TableComponent>
</FormComponent>
<el-dialog :close-on-click-modal="false" :title="taskIsReadonly?'详情':taskUpdataParams.index?'编辑':'新增'" :visible.sync="showSubUpdate" width="952px"
:before-close="handleCloseTask">
<el-dialog :close-on-click-modal="false" :title="taskIsReadonly ? '详情' : taskUpdataParams.index ? '编辑' : '新增'"
:visible.sync="showSubUpdate" width="952px" :before-close="handleCloseTask">
<FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center"
@actionCallback="taskCallback" @change="taskSelectChange">
@ -127,15 +127,17 @@ export default class MeasureComponent extends Vue {
width: "25%",
datas: this.secondTypeItem
}, {
name:"",
key: "thirdType",
type: "text",
require: true,
width: "25%",
showError: false,
}, {
name: "措施描述",
key: "description",
type: "text",
type: "textarea",
require: true,
width: "100%"
}];
@ -202,7 +204,7 @@ export default class MeasureComponent extends Vue {
}, {
name: "隐患排查任务",
key: "name",
type: "text",
type: "textarea",
width: "100%",
require: true,
}, {
@ -324,7 +326,7 @@ export default class MeasureComponent extends Vue {
public buildTable() {
//
this.tableColumn.push({ name: '序号', key: "index" ,width:"80px"});
this.tableColumn.push({ name: '序号', key: "index", width: "80px" });
this.tableColumn.push({ name: "任务名称", key: "name" })
this.tableColumn.push({ name: "执行岗位", key: "executePostName" })
this.tableColumn.push({ name: "执行人", key: "chargeUserName" })

View File

@ -44,4 +44,9 @@ export default class JobHazardService extends BaseService<any>{
const url = this.prefix.prevention+'/job/inventory/filter/list';
return this.post(url,params,{},true)
}
//过滤区域单元
public getDistinctList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/inventory/getDistinctList';
return this.post(url,params)
}
}

View File

@ -197,25 +197,32 @@ export default class PlanComponent extends BaseRecordComponent<any> {
showError: false,
datas: this.$store.state.prevention_danger_check_type
}, {
name: "巡检周期",
name: "巡检周期 每隔",
key: "inspectCycleValue",
type: "number",
hide: this.updateParams.planType === 1,
controls: false,
width: "calc(50% - 20px)",
controls: true,
width: "calc(35% - 20px)",
require: true,
showError: false,
}, {
name: "巡检周期单位",
// name: "",
key: "inspectCycleUnit",
format: "inspectCycleUnitName",
type: "select",
hide: this.updateParams.planType === 1,
width: "calc(50% - 20px)",
width: "calc(15% - 20px)",
require: true,
showError: false,
datas: this.$store.state.prevention_cycle_unit
}, {
name: "1次",
key: "times",
type: 'null',
labelWidth:"0px",
// width: "30px",
hide: this.updateParams.planType === 1,
},{
name: "检查区域",
key: "areaIds",
format: "areaNames",
@ -345,9 +352,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
public buildTable() {
this.tableColumn.push({ name: '检查标题', key: "name", width: "100px" });
this.tableColumn.push({ name: '检查标题', key: "name", width: "250px" });
this.tableColumn.push({
name: '检查类型', width: "100px", render: (data) => {
name: '检查类型', render: (data) => {
return this.$store.getters.prevention_danger_check_type_map[data.inspectType]
}
});
@ -356,9 +363,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
return data.startTime + (data.endTime ? '~' + data.endTime : "")
}
});
this.tableColumn.push({ name: '检查负责人', key: "chargeUserName", width: "100px" });
this.tableColumn.push({ name: '检查范围', width: "270px", key: "scope" });
this.tableColumn.push({ name: '发现隐患数量', key: "dangerCount", width: "120px" });
this.tableColumn.push({ name: '检查负责人', key: "chargeUserName",});
this.tableColumn.push({ name: '检查范围', key: "scope" });
this.tableColumn.push({ name: '发现隐患数量', key: "dangerCount",});
this.tableColumn.push({
name: '检查类型', render: (data) => {
return this.planTypeMap[data.planType]

View File

@ -96,7 +96,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
name: "姓名",
key: "userId",
type: "select",
datas:this.$store.state.userList
datas: this.$store.state.userList
}, {
name: "岗位",
key: "postName",
@ -156,7 +156,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
name: "岗位:",
type: "text",
key: "postName",
require: true,
// require: true,
width: "calc(50% - 20px)",
showError: false,
disable: true,
@ -188,7 +188,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
showError: false,
datas: this.rewardsType
}, {
name: "发生金额/¥",
name: "发生金额/",
type: "number",
key: "money",
require: true,
@ -244,12 +244,16 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
if (item && item.key === 'userId') {
this.userService.getDetailsByIds({ userId: data }).then((res: any) => {
if (res.code === 200) {
const postName = res.posts.map((item) => item.postName).join(",")
const postName = res.postIds.map((item) => {
if (item) {
return this.$store.getters.post_map[item]
}
}
).join(",")
this.updateParams.userName = res.data.nickName
this.updateParams.postName = postName
this.buildUpdateForm()
}
})
}
}
@ -282,7 +286,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
}
});
this.subTableColumn.push({ name: '事由', key: "reason", });
this.subTableColumn.push({ name: '发生金额/¥', key: "money" });
this.subTableColumn.push({ name: '发生金额/', key: "money" });
this.subTableColumn.push({ name: '实施人', key: "operatorName", });
this.subTableColumn.push({ name: '实施部门', key: "operateDeptName", });
}

View File

@ -107,7 +107,7 @@
v-if="scope.row.recordFlag" @blur="inputClick(scope.row)" v-focus></el-input>
<span
style="font-size: 14px;font-weight: 400;color: rgba(0,0,0,0.3) ;line-height: 20px;"
v-if="!scope.row.recordFlag && !scope.row.record">{{'点击输入评估记录'}}</span>
v-if="!scope.row.recordFlag && !scope.row.record">{{isReadonly?'--': '点击输入评估记录'}}</span>
<span v-if="!scope.row.recordFlag &&scope.row.record ">
{{scope.row.record}}
</span>

View File

@ -188,11 +188,7 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
public updateActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary"
}, {
},{
name: "保存",
value: "save",
type: "primary"

View File

@ -12,7 +12,7 @@ import DrawComponent from '@/components/draw.component.vue';
import SystemService from "hbt-common/service/system.service"
@Component({
template,
components:{
components: {
FormComponent,
TableComponent,
DrawComponent,
@ -24,17 +24,17 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
public systemService = new SystemService();
//
public params = {
name:"",
chargeDeptId:null,
majorHazardFlag:null
name: "",
chargeDeptId: null,
majorHazardFlag: null
} as any;
public filters = [{
text:"未绘制",
value:0
},{
text:"已绘制",
value:1
text: "未绘制",
value: 0
}, {
text: "已绘制",
value: 1
}]
public isArea = true;
@ -46,51 +46,51 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
//
public formActions = [{
name:"查询",
value:"search",
icon:"el-icon-search",
type:"primary"
},{
name:"清空",
icon:"el-icon-tickets",
value:"reset"
name: "查询",
value: "search",
icon: "el-icon-search",
type: "primary"
}, {
name: "清空",
icon: "el-icon-tickets",
value: "reset"
}];
//
public tableActions = [{
name:"添加",
value:"add",
icon:"el-icon-plus",
type:"primary"
},{
name:"批量绘制",
value:"drawList",
plain:true,
icon:"el-icon-plus",
type:"primary"
},{
name:"批量删除",
value:"delete",
plain:true,
icon:"el-icon-delete",
type:"danger"
name: "添加",
value: "add",
icon: "el-icon-plus",
type: "primary"
}, {
name: "批量绘制",
value: "drawList",
plain: true,
icon: "el-icon-plus",
type: "primary"
}, {
name: "批量删除",
value: "delete",
plain: true,
icon: "el-icon-delete",
type: "danger"
}];
//
public footerActions = [{
name:"选择全部",
value:"selectAll",
type:"primary"
},{
name:"反向选择",
value:"reverse"
name: "选择全部",
value: "selectAll",
type: "primary"
}, {
name: "反向选择",
value: "reverse"
}];
//
public formOptions:FormOption<BtnOption>[] = [];
public formOptions: FormOption<BtnOption>[] = [];
public showUpdate = false;
public currentId = -1;
public updateParams = {} as any;
// /
public updateOptions:FormOption<BtnOption>[] = [];
public updateOptions: FormOption<BtnOption>[] = [];
public showDraw = false;
@ -100,201 +100,206 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
public isReadonly = false;
public updateActions:BtnOption[] = [];
public updateActions: BtnOption[] = [];
public selectData = [];
@Watch("$store.state.deptList",{immediate:true,deep:true})
onChanges(){
@Watch("$store.state.deptList", { immediate: true, deep: true })
onChanges() {
this.buildFormOptions()
}
created(){
created() {
}
public buildFormOptions(){
public buildFormOptions() {
this.updateOptions = [{
name:"区域编号",
key:"number",
type:"text",
disable:true,
showError:false,
width:"calc(50% - 20px)",
require:true
},{
name:"区域名称",
key:"name",
type:"text",
showError:false,
width:"calc(50% - 20px)",
require:true
},{
name:"责任部门",
key:"chargeDeptId",
format:"chargeDeptName",
type:"treeSelect",
width:"calc(50% - 20px)",
require:true,
expandLevel:Infinity,
showError:false,
datas:this.$store.state.deptTreeList
},{
name:"责任人",
key:"chargeUserId",
format:"chargeUserName",
type:"select",
width:"calc(50% - 20px)",
require:true,
showError:false,
datas:this.$store.state.userList
},{
name:"属于重大危险源",
key:"majorHazardFlag",
format:"majorHazardFlagName",
type:"radio",
width:"calc(50% - 20px)",
labelWidth:"auto",
require:true,
showError:false,
datas:this.$store.state.common_yes_no
},{
name:"重大危险源名称",
key:"majorHazardName",
hide:!this.updateParams.majorHazardFlag,
type:"text",
width:"calc(50% - 20px)",
require:true,
showError:false,
},{
name:"重大危险源等级",
key:"majorHazardLevel",
type:"select",
hide:!this.updateParams.majorHazardFlag,
width:"calc(50% - 20px)",
require:true,
showError:false,
datas:[{
name:"一级",
value:1
},{
name:"二级",
value:2
},{
name:"三级",
value:3
},{
name:"四级",
value:4
},{
name:"不涉及",
value:5
name: "区域编号",
key: "number",
type: "text",
disable: true,
showError: false,
width: "calc(50% - 20px)",
require: true
}, {
name: "区域名称",
key: "name",
type: "text",
showError: false,
width: "calc(50% - 20px)",
require: true
}, {
name: "责任部门",
key: "chargeDeptId",
format: "chargeDeptName",
type: "treeSelect",
width: "calc(50% - 20px)",
require: true,
expandLevel: Infinity,
showError: false,
datas: this.$store.state.deptTreeList
}, {
name: "责任人",
key: "chargeUserId",
format: "chargeUserName",
type: "select",
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: this.$store.state.userList
}, {
name: "属于重大危险源",
key: "majorHazardFlag",
format: "majorHazardFlagName",
type: "radio",
width: "calc(50% - 20px)",
labelWidth: "auto",
require: true,
showError: false,
datas: this.$store.state.common_yes_no
}, {
name: "重大危险源名称",
key: "majorHazardName",
hide: !this.updateParams.majorHazardFlag,
type: "text",
width: "calc(50% - 20px)",
require: true,
showError: false,
}, {
name: "重大危险源等级",
key: "majorHazardLevel",
format: "majorHazardLevelName",
type: "select",
hide: !this.updateParams.majorHazardFlag,
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: [{
name: "一级",
value: 1
}, {
name: "二级",
value: 2
}, {
name: "三级",
value: 3
}, {
name: "四级",
value: 4
}, {
name: "不涉及",
value: 5
}]
},{
type:"btn",
name:"区域绘制",
width:"calc(50% - 20px)",
btn:[{
name:"开始绘制",
value:"draw",
height:"36px",
hide:this.isReadonly,
size:"small",
icon:"el-icon-edit-outline",
type:"primary"
},{
name:"查看绘制",
value:"readDraw",
hide:!this.isReadonly,
height:"36px",
size:"small",
icon:"el-icon-edit-outline",
type:"primary"
}, {
type: "btn",
name: "区域绘制",
width: "calc(50% - 20px)",
btn: [{
name: "开始绘制",
value: "draw",
height: "36px",
hide: this.isReadonly,
size: "small",
icon: "el-icon-edit-outline",
type: "primary"
}, {
name: "查看绘制",
value: "readDraw",
hide: !this.isReadonly,
height: "36px",
size: "small",
icon: "el-icon-edit-outline",
type: "primary"
}]
},{
name:"分析对象编号",
key:"analTargetNum",
type:"text",
showError:false,
width:"calc(50% - 20px)",
require:true,
}, {
name: "分析对象编号",
key: "analTargetNum",
type: "text",
showError: false,
width: "calc(50% - 20px)",
require: true,
}];
this.updateActions = [{
name:"取消",
value:"cancel"
},{
name:"保存并继续添加",
value:"saveAndContinue",
hide:this.currentId!=-1,
type:"primary"
},{
name:"保存",
value:"submit",
type:"primary"
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
hide: this.currentId != -1,
type: "primary"
}, {
name: "保存",
value: "submit",
type: "primary"
}];
this.formOptions=[{
name:"区域名称",
key:"name",
type:"text"
},{
name:"责任部门",
key:"chargeDeptId",
type:"select",
datas:this.$store.state.deptList
},{
name:"是否重大危险源",
key:"majorHazardFlag",
type:"select",
datas:this.$store.state.common_yes_no
this.formOptions = [{
name: "区域名称",
key: "name",
type: "text"
}, {
name: "责任部门",
key: "chargeDeptId",
type: "select",
datas: this.$store.state.deptList
}, {
name: "是否重大危险源",
key: "majorHazardFlag",
type: "select",
datas: this.$store.state.common_yes_no
}]
}
public getQrCode(row){
public getQrCode(row) {
this.tableService.getQrCode({
url:"/",
id:row.id,
system:"prevention",
type:0,
data:"",
params:{
"区域名称" : row.name,
"区域编号" : row.number,
"责任人" : row.chargeUserName,
"责任部门" : row.chargeDeptName,
"重大危险源名称" : row.majorHazardName
url: "/",
id: row.id,
system: "prevention",
type: 0,
data: "",
params: {
"区域名称": row.name,
"区域编号": row.number,
"责任人": row.chargeUserName,
"责任部门": row.chargeDeptName,
"重大危险源名称": row.majorHazardName
}
}).then((res:any)=>{
}).then((res: any) => {
this.showQrCode = true;
this.qrUrl = res.data.url;
})
}
public buildTable(){
this.tableColumn.push({name:'区域名称',key:"name"});
this.tableColumn.push({name:'责任部门',key:"chargeDeptName"});
this.tableColumn.push({name:'责任人',key:"chargeUserName"});
this.tableColumn.push({name:'是否属于重大危险源',key:"majorHazardFlag",render:(data)=>{
public buildTable() {
this.tableColumn.push({ name: '区域名称', key: "name" });
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
this.tableColumn.push({
name: '是否属于重大危险源', key: "majorHazardFlag", render: (data) => {
return this.$store.getters.common_yes_no_map[data.majorHazardFlag]
}});
this.tableColumn.push({name:'绘制情况',filters:this.filters,filterMethod:(data,row)=>{
if(data){
return row.geoJson && row.geoJson!=="[]"
}else{
}
});
this.tableColumn.push({
name: '绘制情况', filters: this.filters, filterMethod: (data, row) => {
if (data) {
return row.geoJson && row.geoJson !== "[]"
} else {
return !row.geoJson || row.geoJson === "[]"
}
}, render:(data)=>{
if(data.geoJson==='[]' || !data.geoJson){
}, render: (data) => {
if (data.geoJson === '[]' || !data.geoJson) {
return "<span class='noDraw'>未绘制</span>"
}else{
return "<span>已绘制</span>"
} else {
return "<span class='color_1'>已绘制</span>"
}
}});
}
});
}
public doDraw(){
if(!this.updateParams.name){
public doDraw() {
if (!this.updateParams.name) {
this.$message.error("请先输入区域名称");
return
}
@ -302,98 +307,98 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
this.showDraw = true;
}
public getCreateNumber(){
this.tableService.getAreaNumber().then((res)=>{
this.updateParams = {bottomHeight:0,topHeight:0,geoJson:"[]",number:res.data} as any;
public getCreateNumber() {
this.tableService.getAreaNumber().then((res) => {
this.updateParams = { bottomHeight: 0, topHeight: 0, geoJson: "[]", number: res.data } as any;
this.buildFormOptions();
this.showUpdate = true
})
}
public doSave(goOn?){
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res)=>{
this.$message.success(this.currentId===-1?"新增成功!":"修改成功!");
if(goOn){
public doSave(goOn?) {
this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res) => {
this.$message.success(this.currentId === -1 ? "新增成功!" : "修改成功!");
if (goOn) {
this.getCreateNumber();
}else{
} else {
this.handleClose();
}
this.getTableData();
})
}
public change(data,item?){
public change(data, item?) {
//
if(item && item.key === "chargeDeptId"){
if (item && item.key === "chargeDeptId") {
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
}
//
if(item && item.key === "chargeUserId"){
if (item && item.key === "chargeUserId") {
this.updateParams.chargeUserName = this.$store.getters.user_map[data];
}
//
if(item && item.key === "majorHazardFlag"){
if (item && item.key === "majorHazardFlag") {
this.updateOptions[5].hide = !data;
this.updateOptions[6].hide = !data;
}
}
public callback(data,type?){
if(type){
public callback(data, type?) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if(data && data.value==="search"){
if (data && data.value === "search") {
this.getTableData()
//
}else if(data && data.value === "reset"){
} else if (data && data.value === "reset") {
this.reset()
//
}else if(data && data.value === "reverse"){
} else if (data && data.value === "reverse") {
this.toggleAll()
//
}else if(data && data.value === "selectAll"){
} else if (data && data.value === "selectAll") {
this.selectAll()
}else if(data && data.value === "add"){
} else if (data && data.value === "add") {
this.showUpdateModel()
}else if(data && data.value === "delete"){
this.deleteData(this.selectData.map((item:any)=>item.id))
}else if(data && (data.value === "draw" || data.value==="readDraw")){
} else if (data && data.value === "delete") {
this.deleteData(this.selectData.map((item: any) => item.id))
} else if (data && (data.value === "draw" || data.value === "readDraw")) {
this.doDraw()
}else if(data && data.value === "drawList"){
} else if (data && data.value === "drawList") {
this.drawModel = "list";
this.showDraw = true;
}else if(data && data.value === "submit"){
} else if (data && data.value === "submit") {
this.doSave()
}else if(data && data.value === "saveAndContinue"){
} else if (data && data.value === "saveAndContinue") {
this.doSave(true)
}else if(data && data.value === "cancel"){
} else if (data && data.value === "cancel") {
this.updateParams = {} as any;
this.handleClose();
}
}
//
public reset(){
public reset() {
this.params = {
name:null,
chargeDeptId:null,
majorHazardFlag:null,
pageNum:1,
pageSize:20,
name: null,
chargeDeptId: null,
majorHazardFlag: null,
pageNum: 1,
pageSize: 20,
} as any;
}
public showUpdateModel(data?,isRead?){
if(!data){
public showUpdateModel(data?, isRead?) {
if (!data) {
this.currentId = -1;
this.getCreateNumber();
}else{
} else {
this.currentId = data.id;
this.updateParams = Object.assign({bottomHeight:0,topHeight:0,geoJson:"[]",majorHazardFlagName:this.$store.getters.common_yes_no_map[data.majorHazardFlag]},data);
this.updateParams = Object.assign({ bottomHeight: 0, topHeight: 0, geoJson: "[]", majorHazardFlagName: this.$store.getters.common_yes_no_map[data.majorHazardFlag], majorHazardLevelName: this.levelName(data.majorHazardLevel) }, data);
this.isReadonly = !!isRead;
this.buildFormOptions();
@ -401,7 +406,21 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
}
}
public handleClose(){
public levelName(type) {
if (type === 1) {
return "一级"
} else if (type === 2) {
return "二级"
} else if (type === 3) {
return "三级"
} else if (type === 4) {
return "四级"
} else if (type === 5) {
return "不涉及级"
}
}
public handleClose() {
this.showUpdate = false;
this.currentId = -1;
this.isReadonly = false;
@ -410,29 +429,29 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
public toggleAll() {
this.tableData.datas.forEach((item,index)=>{
this.tableData.datas.forEach((item, index) => {
(this.$refs.multipleTable as any).toggleRowSelection(item);
})
}
public selectAll(){
if(!this.selectData.length){
public selectAll() {
if (!this.selectData.length) {
this.toggleAll()
}else{
this.tableData.datas.forEach((item,index)=>{
const find = this.selectData.find((data:any)=>data.id === item.id);
if(!find){
} else {
this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data: any) => data.id === item.id);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}
})
}
}
public handleSelectionChange(data){
public handleSelectionChange(data) {
this.selectData = data;
}
mounted(){
mounted() {
}
}
</script>

View File

@ -22,11 +22,11 @@
</template>
</el-table-column>
<template v-for="item in tableColumn">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key" :show-overflow-tooltip="item.showTip">
<div slot-scope="scope" v-html="item.render(scope.row)" @click="showPros($event,scope.row)">
</div>
</el-table-column>
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key">
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key" :show-overflow-tooltip="item.showTip">
</el-table-column>
</template>
<el-table-column label="操作" fixed="right" width="150">

View File

@ -291,7 +291,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
public buildTable() {
this.tableColumn.push({ name: '区域名称', key: "areaName", width: "200px" });
this.tableColumn.push({ name: '风险分析单元', key: "unitName", width: "200px" });
this.tableColumn.push({ name: '设备名称', key: "name" });
this.tableColumn.push({ name: '设备名称', key: "name",width:"250px",showTip: true, });
this.tableColumn.push({
name: '设备类别', key: "type", render: (data) => {
if (data.type) {

View File

@ -46,7 +46,7 @@
</div>
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
:visible.sync="showUpdate" width="1080px" :before-close="handleClose" destroy-on-close>
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
<div class="sub-title">安全检查表分析法</div>

View File

@ -748,11 +748,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
if (!data) {
data = []
}
if (data.length > 0 && data.includes(0)) {
data = []
this.updateParams.majorSign = []
data.push(0)
this.updateParams.majorSign.push(0)
if (this.updateParams.majorSign.includes(0)) {
this.updateParams.majorSign = this.updateParams.majorSign.filter(item => item === 0)
data = this.updateParams.majorSign.filter(item => item === 0)
}
}
this.buildUpdateForm()
@ -812,10 +810,14 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
this.tableService.selectById(this.currentId).then((res: any) => {
if (isReadonly) {
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
const majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
const regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
const regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
this.updateParams = Object.assign({
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(",").map(item => this.sourceMap[item]).join(","),
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(",").map(item => this.craftMap[item]).join(","),
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(",").map(item => this.chemicaltMap[item]).join(","),
majorHazardName: majorHazard || majorHazard === 0 ? this.sourceMap[majorHazard] : null,
regulatoryProcessName: regulatoryProcess || regulatoryProcess === 0 ? this.craftMap[regulatoryProcess] : null,
regulatoryChemicalName: regulatoryChemical || regulatoryChemical === 0 ? this.chemicaltMap[regulatoryChemical] : null,
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(",").map(item => this.$store.getters.prevention_majorsign_map[item]).join(","),
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
@ -836,9 +838,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
this.isModifyonly = true
this.updateParams = res.data;
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
this.updateParams.majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
this.updateParams.regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
this.updateParams.regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
this.updateParams.analRiskLevel = areaAnalRiskLevel
this.loadUnitData(res.data.areaId)
@ -863,9 +865,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public doSave(goOn?) {
//
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
if (!this.updateParams.id) {
if (this.updateParams.steps && this.updateParams.steps.length > 0) {
@ -885,9 +887,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public doSaveDraft() {
//
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
if (this.updateParams.steps && this.updateParams.steps.length > 0) {
this.updateParams.items = this.updateParams.steps
@ -994,6 +996,16 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
return data.split(",").map((item) => parseInt(item))
}
}
//
public numberChangeString(data) {
if (data || data === 0) {
return data.toString()
} else {
return null
}
}
}
</script>
<style lang="scss" scoped src="../../../common.component.scss"></style>

View File

@ -97,6 +97,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
public updateParams = {
identifyTime: moment().format('YYYY-MM-DD'),
identifyUserId: this.account.userId,
steps: [],
} as any;
public selectData = [];
@ -351,7 +352,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
const isTarget = el.target.classList.contains("link");
if (isTarget) {
this.showSteptable = true;
this.tableService.getListDetail({ id: data.id }).then((res:any) => {
this.tableService.getListDetail({ id: data.id }).then((res: any) => {
this.currentStepTableData.datas = res.data.steps.map((item, index) => {
item.index = index + 1;
return item
@ -482,7 +483,10 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
this.updateParams = {
postCode: [],
safetyFactor: []
safetyFactor: [],
identifyTime: moment().format('YYYY-MM-DD'),
identifyUserId: this.account.userId,
steps: []
} as any
this.showUpdate = !!goOn;
this.getTableData();

View File

@ -46,7 +46,7 @@
</div>
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
:visible.sync="showUpdate" width="1080px" :before-close="handleClose" destroy-on-close>
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
<div class="sub-title">工作危害分析法</div>
@ -97,7 +97,7 @@
</el-dialog>
<!-- 检查项目 -->
<el-dialog :close-on-click-modal="false" title="作业步骤" :show-close="false" :visible.sync="showProtable"
width="940px" destroy-on-close>
width="940px">
<FormComponent labelWidth="110px" labelAlign="right" :actions="proActions" @actionCallback="proCallback"
:full-btn="true" btnPosition="center">
<TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false"

View File

@ -253,7 +253,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
format: "analRiskLevelName",
require: true,
width: "calc(50% - 20px)",
labelWidth:"140px",
labelWidth: "140px",
type: "select",
showError: false,
disable: true,
@ -263,57 +263,60 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
key: "majorSign",
format: "majorSignName",
type: "checkbox",
labelWidth:"140px",
labelWidth: "140px",
width: "calc(100% - 20px)",
require: true,
showError: false,
datas: [{
name: "不涉及",
disable: false,
value: 0
}, {
name: "重大危险源",
disable: this.updateParams.majorSign.includes(0),
disable: this.updateParams.majorSign && this.updateParams.majorSign.includes(0),
value: 1
}, {
name: "重大监管化工工艺",
disable: this.updateParams.majorSign.includes(0),
disable: this.updateParams.majorSign && this.updateParams.majorSign.includes(0),
value: 2
}, {
name: "重点监管危化品",
disable: this.updateParams.majorSign.includes(0),
disable: this.updateParams.majorSign && this.updateParams.majorSign.includes(0),
value: 3
}],
}, {
name: "重大危险源",
key: "majorHazard",
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || (!this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0)),
hide: (!this.updateParams.majorSign) || (this.updateParams.majorSign && (this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0))),
type: "select",
format: "majorHazardName",
width: "calc(50% - 20px)",
require: true,
// multiple: true,
datas: this.dictData.source
datas: this.dictData.source,
showError: false,
}, {
name: "重点监管工艺",
key: "regulatoryProcess",
format: "regulatoryProcessName",
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0),
hide: (!this.updateParams.majorSign) || (this.updateParams.majorSign && (this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0))),
type: "select",
width: "calc(50% - 20px)",
require: true,
// multiple: true,
datas: this.dictData.craft,
showError: false,
}, {
name: "重点监管化学品",
key: "regulatoryChemical",
format: "regulatoryChemicalName",
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0),
hide: (!this.updateParams.majorSign) || (this.updateParams.majorSign && (this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0))),
type: "select",
width: "calc(50% - 20px)",
require: true,
// multiple: true,
datas: this.dictData.chemical,
showError: false,
}];
this.subTableActions = [{
@ -335,6 +338,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
require: true,
width: "calc(50% - 20px)",
disable: true,
showError: false,
datas: this.$store.state.prevention_risk_level
}, {
name: "残余风险等级",
@ -344,6 +348,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
require: true,
width: "calc(50% - 20px)",
disable: true,
showError: false,
datas: this.$store.state.prevention_risk_level
}]
}
@ -417,11 +422,11 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
public loadAreaData() {
this.unitList = [];
this.jobList = [];
this.areaService.selectByPage({ pageSize: 1000 }).then((res: any) => {
this.areaList = res.data.datas.map(item => {
this.tableService.getDistinctList({}).then((res: any) => {
this.areaList = res.data.map(item => {
return {
name: item.name,
value: item.id,
name: item.areaName,
value: item.areaId,
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
}
});
@ -430,14 +435,14 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
}
//
public loadUnitData(id?) {
this.unitService.selectByPage({ pageSize: 1000, areaId: id }, false).then((res: any) => {
this.unitList = res.data.datas.map(item => {
this.tableService.getDistinctList({ areaId: id }).then((res: any) => {
this.unitList = res.data.map(item => {
return {
name: item.name,
value: item.id,
name: item.unitName,
value: item.unitId,
deptId: item.chargeDeptId,
userId: item.chargeUserId,
deptName: item.chargeDeptName,
userId: item.chargeUserId,
userName: item.chargeUserName,
}
});
@ -742,11 +747,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
if (!data) {
data = []
}
if (data.includes(0)) {
data = []
this.updateParams.majorSign = []
data.push(0)
this.updateParams.majorSign.push(0)
if (this.updateParams.majorSign.includes(0)) {
this.updateParams.majorSign = this.updateParams.majorSign.filter(item => item === 0)
data = this.updateParams.majorSign.filter(item => item === 0)
}
}
@ -796,10 +799,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
this.tableService.selectById(this.currentId).then((res: any) => {
if (isReadonly) {
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
const majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
const regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
const regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
this.updateParams = Object.assign({
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(",").map(item => this.sourceMap[item]).join(","),
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(",").map(item => this.craftMap[item]).join(","),
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(",").map(item => this.chemicaltMap[item]).join(","),
majorHazardName: majorHazard || majorHazard === 0 ? this.sourceMap[majorHazard] : null,
regulatoryProcessName: regulatoryProcess || regulatoryProcess === 0 ? this.craftMap[regulatoryProcess] : null,
regulatoryChemicalName: regulatoryChemical || regulatoryChemical === 0 ? this.chemicaltMap[regulatoryChemical] : null,
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(",").map(item => this.$store.getters.prevention_majorsign_map[item]).join(","),
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
@ -821,9 +827,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
this.isModifyonly = true
this.updateParams = res.data;
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
this.updateParams.majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
this.updateParams.regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
this.updateParams.regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
this.updateParams.analRiskLevel = areaAnalRiskLevel
this.loadUnitData(res.data.areaId)
@ -844,7 +850,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
this.showUpdate = false;
}
public handleAnalyClose(){
public handleAnalyClose() {
this.showSubUpdate = false
}
@ -852,9 +858,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
public doSave(goOn?) {
//
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
@ -866,9 +872,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
public doSaveDraft() {
//
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
this.tableService.addOrDraft(this.updateParams, !this.updateParams.id).then((res) => {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
@ -878,7 +884,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
}
public toggleAll() {
this.tableData.datas.forEach((item,index)=>{
this.tableData.datas.forEach((item, index) => {
(this.$refs.multipleTable as any).toggleRowSelection(item);
})
}
@ -969,6 +975,16 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
return data.split(",").map((item) => parseInt(item))
}
}
//
public numberChangeString(data) {
if (data || data === 0) {
return data.toString()
} else {
return null
}
}
}
</script>
<style lang="scss" scoped src="../../../common.component.scss"></style>

View File

@ -219,9 +219,9 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
this.tableColumn.push({ name: '排查时间', key: "checkTime" });
this.tableColumn.push({
name: '是否为隐患', key: "dangerFlag", render: (data) => {
if (data.status == 1) {
if (data.dangerFlag == 1) {
return "<span class='noDraw'>是</span>"
} else if (data.status == 0) {
} else if (data.dangerFlag == 0) {
return "<span>否</span>"
}
}
@ -239,7 +239,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
//
if (data.value === "search") {
this.getTableData()
console.log('this.tableData',this.tableData);
console.log('this.tableData', this.tableData);
//
} else if (data.value === "reset") {
@ -279,7 +279,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
public toggleAll() {
this.tableData.datas.forEach((item,index)=>{
this.tableData.datas.forEach((item, index) => {
(this.$refs.multipleTable as any).toggleRowSelection(item);
})
}
@ -361,7 +361,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
this.updateParams = Object.assign({
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
resultName: row.result === 1 ? '正常' : '异常',
dangerFlagName: row.dangerFlag === 0 ? '否' : '是',
dangerFlagName: row.dangerFlag === 0 ? '否' : row.dangerFlag === 1 ? '是' : null,
taskTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType],
checkUserName: this.$store.getters.user_map[row.checkUserId]
}, row)

View File

@ -248,9 +248,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
require: true,
width: "calc(50% - 20px)",
showError: false,
rules: [
{ pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', }
]
// rules: [
// { pattern: /^1[3|5|7|8|9]\d{9}$/, message: '', }
// ]
},
{
name: "应急联络方式",
@ -259,9 +259,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
require: true,
width: "calc(50% - 20px)",
showError: false,
rules: [
{ pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', }
]
// rules: [
// { pattern: /^1[3|5|7|8|9]\d{9}$/, message: '', }
// ]
},
{
name: "附件",

View File

@ -276,6 +276,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
require: true,
width: "calc(50% - 20px)",
showError: false,
hide: !(this.subUpdateParams.examStatus === 1)
},]
}
@ -345,6 +346,13 @@ export default class TrainRecords extends BaseRecordComponent<any> {
this.updateParams.endTime = null
}
}
if (item && item.key === "examStatus") {
if (data === 0) {
this.subUpdateParams.score = null
}
this.buildSubForm()
}
}
public callback(data, type) {