forked from xxhjsb/hbt-prevention-ui
feat:新增检查对象
parent
969a3fe1fd
commit
858c131d56
|
@ -35,4 +35,9 @@ export default class AreaService extends BaseService<any>{
|
||||||
return this.put(url,params,{},showLoading)
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -20,7 +20,8 @@ export default new Vuex.Store({
|
||||||
prevention_danger_type:[],
|
prevention_danger_type:[],
|
||||||
prevention_occur_step:[],
|
prevention_occur_step:[],
|
||||||
prevention_major_type:[],
|
prevention_major_type:[],
|
||||||
prevention_device_type:[]
|
prevention_device_type:[],
|
||||||
|
analControlList:[],
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
dept_map:(state)=>{
|
dept_map:(state)=>{
|
||||||
|
@ -127,10 +128,20 @@ export default new Vuex.Store({
|
||||||
map[item.value] = item.name
|
map[item.value] = item.name
|
||||||
})
|
})
|
||||||
return map
|
return map
|
||||||
}
|
},
|
||||||
|
prevention_anal_control_map:(state)=>{
|
||||||
|
const map = {};
|
||||||
|
state.analControlList.forEach((item:any)=>{
|
||||||
|
map[item.value] = item.name
|
||||||
|
})
|
||||||
|
return map
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
setAnalCntrol(state,data){
|
||||||
|
state.analControlList = data;
|
||||||
|
},
|
||||||
setDeptList(state,data){
|
setDeptList(state,data){
|
||||||
state.deptList = data;
|
state.deptList = data;
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import AreaService from '@/service/area.service';
|
import AreaService from '@/service/area.service';
|
||||||
import UnitService from '@/service/unit.service';
|
|
||||||
import SystemService from 'hbt-common/service/system.service';
|
import SystemService from 'hbt-common/service/system.service';
|
||||||
import { Component, Vue } from 'vue-property-decorator';
|
import { Component, Vue } from 'vue-property-decorator';
|
||||||
@Component
|
@Component
|
||||||
|
@ -11,7 +10,6 @@ export default class BlankComponent extends Vue {
|
||||||
|
|
||||||
public systemService = new SystemService();
|
public systemService = new SystemService();
|
||||||
public areaService = new AreaService();
|
public areaService = new AreaService();
|
||||||
public unitService = new UnitService();
|
|
||||||
created() {
|
created() {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.systemService.getDeptTree(),
|
this.systemService.getDeptTree(),
|
||||||
|
@ -29,6 +27,7 @@ export default class BlankComponent extends Vue {
|
||||||
this.systemService.getDictData("prevention_danger_type"),
|
this.systemService.getDictData("prevention_danger_type"),
|
||||||
this.systemService.getDictData("prevention_major_type"),
|
this.systemService.getDictData("prevention_major_type"),
|
||||||
this.systemService.getDictData("prevention_occur_step"),
|
this.systemService.getDictData("prevention_occur_step"),
|
||||||
|
this.areaService.getAnalControls(),
|
||||||
]).then(((results:any)=>{
|
]).then(((results:any)=>{
|
||||||
this.$store.commit("setDeptTreeList",results[0].data);
|
this.$store.commit("setDeptTreeList",results[0].data);
|
||||||
this.$store.commit("setUserList",results[2].data.datas.map((item)=>{
|
this.$store.commit("setUserList",results[2].data.datas.map((item)=>{
|
||||||
|
@ -119,6 +118,7 @@ export default class BlankComponent extends Vue {
|
||||||
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
|
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
this.$store.commit("setAnalCntrol",results[15].data)
|
||||||
|
|
||||||
this.$store.commit("setDeptList", results[1].data.map((item) => {
|
this.$store.commit("setDeptList", results[1].data.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -9,22 +9,29 @@ import AreaService from "@/service/area.service"
|
||||||
import FormOption from "hbt-common/models/formOptions"
|
import FormOption from "hbt-common/models/formOptions"
|
||||||
import BtnOption from "hbt-common/models/btnOptions"
|
import BtnOption from "hbt-common/models/btnOptions"
|
||||||
import DrawComponent from '@/components/draw.component.vue';
|
import DrawComponent from '@/components/draw.component.vue';
|
||||||
|
import MapComponent from "@/components/map.component.vue"
|
||||||
|
import ManagerService from '@/service/manager.service';
|
||||||
|
import mapboxgl from "mapbox-gl";
|
||||||
|
import moment from 'moment';
|
||||||
@Component({
|
@Component({
|
||||||
template,
|
template,
|
||||||
components:{
|
components:{
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
DrawComponent,
|
DrawComponent,
|
||||||
|
MapComponent
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export default class HiddenDangerManagerComponent extends BaseRecordComponent<any> {
|
export default class HiddenDangerManagerComponent extends BaseRecordComponent<any> {
|
||||||
public tableService = new AreaService();
|
public tableService = new ManagerService();
|
||||||
// 是否显示删改查按钮
|
// 是否显示删改查按钮
|
||||||
public isBase = true;
|
public isBase = true;
|
||||||
// 显示治理列表按钮
|
// 显示治理列表按钮
|
||||||
public isManager = true;
|
public isManager = true;
|
||||||
|
|
||||||
public rowActionWidth="370";
|
public tableActionWidth="370";
|
||||||
|
|
||||||
|
public isReadonly = false;
|
||||||
|
|
||||||
public params = {} as any;
|
public params = {} as any;
|
||||||
|
|
||||||
|
@ -58,137 +65,29 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
name:"反向选择",
|
name:"反向选择",
|
||||||
value:"reverse"
|
value:"reverse"
|
||||||
}];
|
}];
|
||||||
public formOptions:FormOption<BtnOption>[] = [{
|
public formOptions:FormOption<BtnOption>[] = [];
|
||||||
name:"隐患等级",
|
|
||||||
key:"areaId",
|
|
||||||
type:"select",
|
|
||||||
datas:[{
|
|
||||||
name:"区域1",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"区域2",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
},{
|
|
||||||
name:"隐患分类",
|
|
||||||
key:"areaId",
|
|
||||||
type:"select",
|
|
||||||
datas:[{
|
|
||||||
name:"区域1",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"区域2",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
},{
|
|
||||||
name:"整改方式",
|
|
||||||
key:"areaId",
|
|
||||||
type:"select",
|
|
||||||
datas:[{
|
|
||||||
name:"区域1",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"区域2",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
}];
|
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public currentId = -1;
|
public currentId = -1;
|
||||||
public updateParams = {} as any;
|
public updateParams = {} as any;
|
||||||
public updateOptions:FormOption<BtnOption>[] = [{
|
public updateOptions:FormOption<BtnOption>[] = [];
|
||||||
name:"区域编号",
|
|
||||||
key:"no",
|
|
||||||
type:"text",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true
|
|
||||||
},{
|
|
||||||
name:"区域名称",
|
|
||||||
key:"areaName",
|
|
||||||
type:"text",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true
|
|
||||||
},{
|
|
||||||
name:"责任部门",
|
|
||||||
key:"deptId",
|
|
||||||
type:"select",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true,
|
|
||||||
datas:[{
|
|
||||||
name:"部门1",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"部门2",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
},{
|
|
||||||
name:"责任人",
|
|
||||||
key:"person",
|
|
||||||
type:"select",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true,
|
|
||||||
datas:[{
|
|
||||||
name:"人员1",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"人员2",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
},{
|
|
||||||
name:"属于重大危险源",
|
|
||||||
key:"isDangrous",
|
|
||||||
type:"radio",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true,
|
|
||||||
datas:[{
|
|
||||||
name:"是",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"否",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
},{
|
|
||||||
name:"重大危险源名称",
|
|
||||||
key:"dangrousName",
|
|
||||||
type:"text",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true,
|
|
||||||
},{
|
|
||||||
name:"重大危险源等级",
|
|
||||||
key:"level",
|
|
||||||
type:"select",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
require:true,
|
|
||||||
datas:[{
|
|
||||||
name:"一级",
|
|
||||||
value:0
|
|
||||||
},{
|
|
||||||
name:"二级",
|
|
||||||
value:1
|
|
||||||
}]
|
|
||||||
},{
|
|
||||||
type:"btn",
|
|
||||||
name:"区域绘制",
|
|
||||||
width:"calc(50% - 20px)",
|
|
||||||
btn:[{
|
|
||||||
name:"开始绘制",
|
|
||||||
value:"draw",
|
|
||||||
type:"primary"
|
|
||||||
}]
|
|
||||||
}];
|
|
||||||
|
|
||||||
|
public fileList = [] as any;
|
||||||
public showDraw = false;
|
public photoList = [] as any;
|
||||||
|
public showFile = false;
|
||||||
public drawModel = "list";
|
public currentUrl = null;
|
||||||
|
public center = [118.751353,31.969568];
|
||||||
|
public marker:any = null;
|
||||||
|
public map:any = null;
|
||||||
|
public showMap = false;
|
||||||
|
|
||||||
|
|
||||||
public updateActions = [{
|
public updateActions = [{
|
||||||
name:"取消",
|
name:"取消",
|
||||||
value:"cancel"
|
value:"cancel"
|
||||||
},{
|
},{
|
||||||
name:"保存并继续添加",
|
name:"提交",
|
||||||
value:"saveAndContinue",
|
value:"submit",
|
||||||
type:"primary"
|
type:"primary"
|
||||||
},{
|
},{
|
||||||
name:"保存",
|
name:"保存",
|
||||||
|
@ -203,6 +102,248 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getTableCallback(){
|
||||||
|
this.formOptions = [{
|
||||||
|
name:"隐患等级",
|
||||||
|
key:"level",
|
||||||
|
type:"select",
|
||||||
|
datas:[{
|
||||||
|
name:"一般隐患",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
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:"限期整改",
|
||||||
|
value:2
|
||||||
|
}]
|
||||||
|
}];
|
||||||
|
|
||||||
|
this.updateOptions = [{
|
||||||
|
name:"隐患编号",
|
||||||
|
key:"number",
|
||||||
|
disable:true,
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
type:"text"
|
||||||
|
},{
|
||||||
|
name:"隐患标题",
|
||||||
|
key:"title",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
type:"text"
|
||||||
|
},{
|
||||||
|
name:"隐患描述",
|
||||||
|
width:"100%",
|
||||||
|
key:"description",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
type:"text"
|
||||||
|
},{
|
||||||
|
name:"隐患级别",
|
||||||
|
key:"level",
|
||||||
|
format:"levelName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:[{
|
||||||
|
name:"一般隐患",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
name:"重大隐患",
|
||||||
|
value:2
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"整改方式",
|
||||||
|
key:"reformMode",
|
||||||
|
format:"reformModeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:[{
|
||||||
|
name:"即查即改",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
name:"限期整改",
|
||||||
|
value:2
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"隐患位置",
|
||||||
|
key:"locationName",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
unit:{
|
||||||
|
type:"btn",
|
||||||
|
name:this.isReadonly?"查看定位":"点击定位",
|
||||||
|
value:"fixed",
|
||||||
|
btnType:"primary"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
name:"隐患分类",
|
||||||
|
key:"classify",
|
||||||
|
format:"classifyName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_dangrous_type
|
||||||
|
},{
|
||||||
|
name:"整改部门",
|
||||||
|
key:"reformDeptId",
|
||||||
|
format:"reformDeptName",
|
||||||
|
type:"treeSelect",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
expandLevel:Infinity,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.deptTreeList
|
||||||
|
},{
|
||||||
|
name:"整改责任人",
|
||||||
|
key:"reformUserId",
|
||||||
|
format:"reformUserName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.userList,
|
||||||
|
},{
|
||||||
|
name:"验证人",
|
||||||
|
key:"verifyUserId",
|
||||||
|
format:"verifyUserName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.userList,
|
||||||
|
},{
|
||||||
|
name:"整改时限",
|
||||||
|
key:"reformDeadline",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
format:"yyyy-MM-dd HH",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
},{
|
||||||
|
name:"隐患照片",
|
||||||
|
key:"photo",
|
||||||
|
ref:"photo",
|
||||||
|
type:"upload",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
onSucess:this.onSuccess,
|
||||||
|
onMove:this.onRemove,
|
||||||
|
showError:false,
|
||||||
|
autoUpload:true,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
accept:"image/png, image/jpeg",
|
||||||
|
listType:"picture-card",
|
||||||
|
fileList:this.photoList,
|
||||||
|
icon:"el-icon-plus",
|
||||||
|
},{
|
||||||
|
name:"相关附件",
|
||||||
|
key:"file",
|
||||||
|
ref:"file",
|
||||||
|
type:"upload",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
onSucess:this.onSuccess2,
|
||||||
|
onMove:this.onRemove2,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
autoUpload:true,
|
||||||
|
accept:"image/png, image/jpeg,.doc,.docx,.xls,.xlsx,.pdf",
|
||||||
|
listType:"text",
|
||||||
|
tip:this.isReadonly?"":"请上传.pdf,.png,.jpg,.doc.docx,.xls,.xlsx格式文件",
|
||||||
|
fileList:this.fileList,
|
||||||
|
btn:[{
|
||||||
|
name:"上传",
|
||||||
|
value:"upload",
|
||||||
|
hide:this.isReadonly,
|
||||||
|
size:"small",
|
||||||
|
type:"primary"
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"隐患类别",
|
||||||
|
key:"dangerType",
|
||||||
|
format:"dangerTypeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_danger_type,
|
||||||
|
},{
|
||||||
|
name:"检查类型",
|
||||||
|
key:"inspectType",
|
||||||
|
format:"inspectTypeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_danger_check_type,
|
||||||
|
},{
|
||||||
|
name:"违章人数",
|
||||||
|
key:"violateNumber",
|
||||||
|
type:"number",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
},{
|
||||||
|
name:"专业分类",
|
||||||
|
key:"professionClassify",
|
||||||
|
format:"professionClassifyName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_major_type,
|
||||||
|
},{
|
||||||
|
name:"属性分类",
|
||||||
|
key:"attributeClassify",
|
||||||
|
format:"attributeClassifyName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_safe_reason,
|
||||||
|
},{
|
||||||
|
name:"发生环节",
|
||||||
|
key:"occurNode",
|
||||||
|
format:"occurNodeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_occur_step,
|
||||||
|
},{
|
||||||
|
name:"违反规定条款",
|
||||||
|
key:"violateTerm",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
showError:false,
|
||||||
|
},{
|
||||||
|
name:"隐患整改要求",
|
||||||
|
key:"reformDemand",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
public buildTable(){
|
public buildTable(){
|
||||||
this.tableColumn.push({name:'序号',key:"areaName"});
|
this.tableColumn.push({name:'序号',key:"areaName"});
|
||||||
this.tableColumn.push({name:'状态',key:"areaName"});
|
this.tableColumn.push({name:'状态',key:"areaName"});
|
||||||
|
@ -237,12 +378,9 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.showUpdateModel(-1)
|
this.showUpdateModel(-1)
|
||||||
}else if(data.value === "delete"){
|
}else if(data.value === "delete"){
|
||||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||||
}else if(data.value === "draw"){
|
}else if(data.value ==="fixed"){
|
||||||
this.drawModel = "area";
|
this.showMap = true
|
||||||
this.showDraw = true;
|
|
||||||
}else if(data.value === "drawList"){
|
|
||||||
this.drawModel = "list";
|
|
||||||
this.showDraw = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 重置数据
|
// 重置数据
|
||||||
|
@ -262,7 +400,73 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getMap(map){
|
||||||
|
this.map = map;
|
||||||
|
this.addMarker();
|
||||||
|
}
|
||||||
|
public addMarker(){
|
||||||
|
this.marker = new mapboxgl.Marker({draggable:!this.isReadonly})
|
||||||
|
.setLngLat(this.center)
|
||||||
|
.addTo(this.map);
|
||||||
|
this.map.flyTo({center:this.center})
|
||||||
|
}
|
||||||
|
|
||||||
|
public onDragEnd() {
|
||||||
|
const lngLat = this.marker.getLngLat();
|
||||||
|
this.updateParams.locationLng = lngLat.lng;
|
||||||
|
this.updateParams.locationLat = lngLat.lat;
|
||||||
|
this.center = [lngLat.lng,lngLat.lat]
|
||||||
|
// this.updateParams.locationName = lngLat.lng+","+lngLat.lat;
|
||||||
|
this.handleClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public onSuccess(res,file,fileList){
|
||||||
|
if(res.code===200){
|
||||||
|
this.photoList.push({
|
||||||
|
name:res.data.originalName,
|
||||||
|
url:res.data.url,
|
||||||
|
type:res.data.type,
|
||||||
|
id:res.data.id
|
||||||
|
});
|
||||||
|
this.updateParams.photo = this.photoList.length || null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public onSuccess2(res,file,fileList){
|
||||||
|
if(res.code===200){
|
||||||
|
this.fileList.push({
|
||||||
|
name:res.data.originalName,
|
||||||
|
url:res.data.url,
|
||||||
|
type:res.data.type,
|
||||||
|
id:res.data.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public onRemove(file,fileList){
|
||||||
|
this.photoList.splice(this.photoList.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
|
this.updateParams.photo = this.photoList.length || null
|
||||||
|
}
|
||||||
|
public onRemove2(file,fileList){
|
||||||
|
this.fileList.splice(this.fileList.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
|
}
|
||||||
|
|
||||||
|
public onPreview(file){
|
||||||
|
if(file.type.indexOf("png")>=0 || file.type.indexOf("jp")>=0){
|
||||||
|
this.currentUrl = file.url;
|
||||||
|
this.showFile = true;
|
||||||
|
}else{
|
||||||
|
window.open(file.url,"_blank")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public handleClose(){
|
public handleClose(){
|
||||||
|
if(this.showMap){
|
||||||
|
this.showMap = false;
|
||||||
|
this.marker.remove();
|
||||||
|
this.marker = null;
|
||||||
|
return
|
||||||
|
}
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,13 +226,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
width:"calc(50% - 20px)",
|
width:"calc(50% - 20px)",
|
||||||
require:true,
|
require:true,
|
||||||
showError:false,
|
showError:false,
|
||||||
datas:[{
|
datas:this.$store.state.analControlList,
|
||||||
name:"是",
|
|
||||||
value:"0-12312312312"
|
|
||||||
},{
|
|
||||||
name:"否",
|
|
||||||
value:"1-12312312312"
|
|
||||||
}]
|
|
||||||
},{
|
},{
|
||||||
name:"适用部门",
|
name:"适用部门",
|
||||||
key:"depts",
|
key:"depts",
|
||||||
|
@ -496,7 +490,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.updateParams.targets = this.updateParams.targets.map(item=>{
|
this.updateParams.targets = this.updateParams.targets.map(item=>{
|
||||||
return {
|
return {
|
||||||
id:item,
|
id:item,
|
||||||
name:item
|
name:this.$store.getters.prevention_anal_control_map[item]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then(res=>{
|
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then(res=>{
|
||||||
|
|
|
@ -384,7 +384,6 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
}else if(data.value === "selectAll"){
|
}else if(data.value === "selectAll"){
|
||||||
this.selectAll()
|
this.selectAll()
|
||||||
}else if(data.value === "delete"){
|
}else if(data.value === "delete"){
|
||||||
console.log(this.selectData)
|
|
||||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||||
this.getTroubleList();
|
this.getTroubleList();
|
||||||
}else if(data.value ==="fixed"){
|
}else if(data.value ==="fixed"){
|
||||||
|
@ -490,7 +489,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public onRemove(file,fileList){
|
public onRemove(file,fileList){
|
||||||
this.photoList.splice(this.photoList.findIndex(item=>item.id === file.response.data.id),1)
|
this.photoList.splice(this.photoList.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
this.updateParams.photo = this.photoList.length
|
this.updateParams.photo = this.photoList.length || null
|
||||||
}
|
}
|
||||||
public onRemove2(file,fileList){
|
public onRemove2(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.response.data.id),1)
|
||||||
|
@ -652,7 +651,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
params.push({
|
params.push({
|
||||||
content:subItem.itemRecord,
|
content:subItem.itemRecord,
|
||||||
resultFlag:subItem.itemResult,
|
resultFlag:subItem.itemResult,
|
||||||
taskTableId:subItem.itemId,
|
taskTableId:subItem.taskTableId,
|
||||||
taskId:this.recordParams.taskId,
|
taskId:this.recordParams.taskId,
|
||||||
inspectUserId:this.account.userId,
|
inspectUserId:this.account.userId,
|
||||||
inspectUserName:this.account.nickName,
|
inspectUserName:this.account.nickName,
|
||||||
|
|
|
@ -234,13 +234,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
require:true,
|
require:true,
|
||||||
multiple:true,
|
multiple:true,
|
||||||
showError:false,
|
showError:false,
|
||||||
datas:[{
|
datas:this.$store.state.analControlList,
|
||||||
name:"是",
|
|
||||||
value:"1-123123123"
|
|
||||||
},{
|
|
||||||
name:"否",
|
|
||||||
value:"0-1231221312"
|
|
||||||
}]
|
|
||||||
},{
|
},{
|
||||||
name:"计划检查时间",
|
name:"计划检查时间",
|
||||||
key:"startTime",
|
key:"startTime",
|
||||||
|
@ -419,7 +413,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
this.updateParams.analControls = data.map((itm)=>{
|
this.updateParams.analControls = data.map((itm)=>{
|
||||||
return {
|
return {
|
||||||
id:itm,
|
id:itm,
|
||||||
name:itm
|
name:this.$store.getters.prevention_anal_control_map[itm]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -567,7 +561,6 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
this.tableTabs = [];
|
this.tableTabs = [];
|
||||||
this.currentPlan = null;
|
this.currentPlan = null;
|
||||||
this.showSend = false;
|
this.showSend = false;
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(this.showRecord){
|
if(this.showRecord){
|
||||||
|
|
Loading…
Reference in New Issue