+
-
-
-
@@ -19,96 +19,99 @@
-
+
+ :filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name"
+ :width="item.width" :key="item.key">
查看
- 修改
+ 修改
删除
-
+
-
-
+
+
检查项目
-
-
-
+
-
+
-
+
+ :filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name"
+ :width="item.width" :key="item.key">
查看
- 修改
+ 修改
删除
-
-
-
-
+
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 取消
- 确定
-
+
+
+
+
+
+
+ 取消
+ 确定
+
\ No newline at end of file
diff --git a/src/views/hiddenDanger/rules/rules.component.vue b/src/views/hiddenDanger/rules/rules.component.vue
index 8a07cf3..51680dc 100644
--- a/src/views/hiddenDanger/rules/rules.component.vue
+++ b/src/views/hiddenDanger/rules/rules.component.vue
@@ -12,7 +12,7 @@ import RuleService from '@/service/rule.service';
import { number } from 'echarts';
@Component({
template,
- components:{
+ components: {
FormComponent,
TableComponent,
DrawComponent,
@@ -28,45 +28,45 @@ export default class RulesComponent extends BaseRecordComponent
{
public isManager = false;
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:"delete",
- plain:true,
- icon:"el-icon-delete",
- type:"danger"
+ name: "添加",
+ value: "add",
+ 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[] = [{
- name:"检查项目",
- key:"name",
- type:"text",
+ public formOptions: FormOption[] = [{
+ name: "检查项目",
+ key: "name",
+ type: "text",
}];
public showUpdate = false;
public currentId = -1;
- public updateParams = {} as any;
- public updateOptions:FormOption[] = [];
+ public updateParams = {} as any;
+ public updateOptions: FormOption[] = [];
public showDraw = false;
@@ -74,184 +74,201 @@ export default class RulesComponent extends BaseRecordComponent {
public drawModel = "list";
- public updateActions = [{
- name:"取消",
- value:"cancel"
- },{
- name:"保存并继续添加",
- value:"saveAndContinue",
- type:"primary"
- },{
- name:"保存",
- value:"save",
- type:"primary"
- }];
+ public updateActions = [] as any;
public selectData = [];
-
- created(){
+
+ created() {
}
- public getTableCallback(){
+ public getTableCallback() {
this.updateOptions = [{
- name:"检查标准编号",
- key:"number",
- type:"text",
- width:"calc(50% - 20px)",
- require:true,
- showError:false,
- disable:true,
- },{
- name:"检查项目",
- key:"name",
- type:"text",
- width:"calc(50% - 20px)",
- require:true,
- showError:false,
- },{
- name:"检查内容",
- key:"content",
- type:"textarea",
- width:"100%",
- require:true,
- showError:false,
- },{
- name:"检查依据",
- key:"reason",
- type:"textarea",
- width:"100%",
- require:true,
- showError:false,
- },{
- name:"类型",
- key:"type",
- format:"typeName",
- type:"select",
- width:"100%",
- require:true,
- datas:this.$store.state.prevention_dangrous_type
+ name: "检查标准编号",
+ key: "number",
+ type: "text",
+ width: "calc(50% - 20px)",
+ require: true,
+ showError: false,
+ disable: true,
+ }, {
+ name: "检查项目",
+ key: "name",
+ type: "text",
+ width: "calc(50% - 20px)",
+ require: true,
+ showError: false,
+ }, {
+ name: "检查内容",
+ key: "content",
+ type: "textarea",
+ width: "100%",
+ require: true,
+ showError: false,
+ }, {
+ name: "检查依据",
+ key: "reason",
+ type: "textarea",
+ width: "100%",
+ require: true,
+ showError: false,
+ }, {
+ name: "类型",
+ key: "type",
+ format: "typeName",
+ type: "select",
+ width: "100%",
+ require: true,
+ multiple: true,
+ showError: false,
+ datas: this.$store.state.prevention_dangrous_type
+ }]
+ this.updateActions = [{
+ name: "取消",
+ value: "cancel"
+ }, {
+ name: "保存并继续添加",
+ value: "saveAndContinue",
+ type: "primary",
+ hide: this.updateParams.id
+ }, {
+ name: "保存",
+ value: "save",
+ type: "primary"
}]
}
- public buildTable(){
- this.tableColumn.push({name:'检查项目',key:"name"});
- this.tableColumn.push({name:'检查内容',key:"content",showTip:true});
- this.tableColumn.push({name:'检查依据',key:"reason",showTip:true});
- this.tableColumn.push({name:'分类',key:"type",render:(data)=>{
- return this.$store.getters.prevention_dangrous_type_map[data.type]
- }});
+ public buildTable() {
+ this.tableColumn.push({ name: '检查项目', key: "name" });
+ this.tableColumn.push({ name: '检查内容', key: "content", showTip: true });
+ this.tableColumn.push({ name: '检查依据', key: "reason", showTip: true });
+ this.tableColumn.push({
+ name: '分类', key: "type", render: (data) => {
+ return data.type.split(',').map(item => {
+ return this.$store.getters.prevention_dangrous_type_map[item]
+ }).join(",")
+ }
+ });
}
- public change(data,item){
+ public change(data, item) {
//
}
- 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 === "delete") {
+ this.deleteData(this.selectData.map((item: any) => item.id));
this.clearSelect()
- }else if(data && data.value.indexOf("save")>=0){
- this.doSave(data.value!=="save")
- }else{
+ } else if (data && data.value.indexOf("save") >= 0) {
+ this.doSave(data.value !== "save")
+ } else {
this.handleClose();
}
}
// 重置数据
- public reset(){
+ public reset() {
this.params = {
- name:"",
- pageNum:1,
- pageSize:20,
+ name: "",
+ pageNum: 1,
+ pageSize: 20,
} as any;
}
-
- public doSave(goOn?){
- this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res=>{
- this.$message.success(this.currentId===-1?"新增成功!":"编辑成功");
+ /**
+ * 数据保存
+ * @param goOn
+ */
+ public doSave(goOn?) {
+ this.updateParams.type = this.updateParams.type.join(',')
+ this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res => {
+ this.$message.success(this.currentId === -1 ? "新增成功!" : "编辑成功");
this.showUpdate = !!goOn;
- this.updateParams = {number:null} as any;
- if(goOn){
- this.tableService.getNumber().then(res=>{
+ this.updateParams = { number: null } as any;
+ if (goOn) {
+ this.tableService.getNumber().then(res => {
this.updateParams.number = res.data
})
}
this.getTableData();
-
}))
}
- public showUpdateModel(row?,isRead?){
-
- this.updateParams = Object.assign({number:null})
+ public showUpdateModel(row?, isRead?) {
+ this.updateParams = Object.assign({ number: null })
this.isReadonly = !!isRead;
- if(!row){
+ if (!row) {
this.currentId = -1;
- this.tableService.getNumber().then(res=>{
+ this.tableService.getNumber().then(res => {
this.updateParams.number = res.data
})
- }else{
- this.updateParams = Object.assign({number:null,typeName:this.$store.getters.prevention_dangrous_type_map[row.type]},row)
+ } else {
+ this.updateParams = Object.assign({
+ number: null,
+ typeName: row.type.split(',').map(item => {
+ return this.$store.getters.prevention_dangrous_type_map[item]
+ }).join(",")
+ }, row)
+ this.updateParams.type = row.type.split(',').map((item: any) => parseInt(item))
this.currentId = row.id;
}
this.clearSelect();
- this.showUpdate = true
+ this.getTableCallback()
+ this.showUpdate = true;
}
- public clearSelect(){
+ public clearSelect() {
(this.$refs.multipleTable as any).clearSelection();
this.selectData = [];
}
- public handleClose(){
+ public handleClose() {
this.showUpdate = false;
this.clearSelect();
}
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;
}
}
diff --git a/src/views/hiddenDanger/safe/action.component.vue b/src/views/hiddenDanger/safe/action.component.vue
index e2cd102..db1e02a 100644
--- a/src/views/hiddenDanger/safe/action.component.vue
+++ b/src/views/hiddenDanger/safe/action.component.vue
@@ -544,6 +544,7 @@ export default class RulesManagerComponent extends BaseRecordComponent {
pageNum: 1,
pageSize: 20,
} as any;
+ this.getTableData()
}
public getMap(map) {
diff --git a/src/views/risk/area/area.component.vue b/src/views/risk/area/area.component.vue
index 9b87721..ed6321f 100644
--- a/src/views/risk/area/area.component.vue
+++ b/src/views/risk/area/area.component.vue
@@ -111,7 +111,7 @@ export default class AreaManagerComponent extends BaseRecordComponent {
created() {
-
+//
}
public buildFormOptions() {
diff --git a/src/views/risk/areaUnit.component.html b/src/views/risk/areaUnit.component.html
index d5b3cb7..cb7660c 100644
--- a/src/views/risk/areaUnit.component.html
+++ b/src/views/risk/areaUnit.component.html
@@ -1,13 +1,13 @@
-
+
-
+
@@ -54,12 +54,9 @@
:data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true"
@change="change" btn-position="center">
*注:安全风险分析对象编码即危险化学品登记综合服务系统中的危险源编码
-
-
停用/检修记录
-
+ :showFooter="false" style="margin-bottom: 20px;height: 200px;">
diff --git a/src/views/risk/assessment/areaAnal/areaAnal.component.html b/src/views/risk/assessment/areaAnal/areaAnal.component.html
index f91dc87..adc2826 100644
--- a/src/views/risk/assessment/areaAnal/areaAnal.component.html
+++ b/src/views/risk/assessment/areaAnal/areaAnal.component.html
@@ -91,11 +91,7 @@
{{scope.row.type4}}
-
-
-
-
diff --git a/src/views/risk/assessment/areaAnal/areaAnal.component.vue b/src/views/risk/assessment/areaAnal/areaAnal.component.vue
index 4a6ea32..1dcb7eb 100644
--- a/src/views/risk/assessment/areaAnal/areaAnal.component.vue
+++ b/src/views/risk/assessment/areaAnal/areaAnal.component.vue
@@ -144,11 +144,18 @@ export default class AreaAnalComponent extends BaseRecordComponent
{
this.showUpdate = true
}
- // 新增 添加L/S值
- public addVal(el, row) {
+ /**
+ * 新增 添加L/S值
+ * @param el
+ * @param row 当前行数据
+ */
+ public addVal(el: any, row: any) {
+ this.riskLDatas = [];
+ this.riskSDatas = [];
this.currentRow = row;
this.cacheCurrentRow = JSON.parse(JSON.stringify(row));
- this.riskLDatas = riskLData;
+ this.riskLDatas = JSON.parse(JSON.stringify(riskLData));
+ this.riskSDatas = JSON.parse(JSON.stringify(riskSData));
this.popTitle = 'L';
const lData = JSON.parse(row.analLikelihoodContent || "[]");
const sData = JSON.parse(row.analSeverityContent || "[]");
@@ -222,7 +229,30 @@ export default class AreaAnalComponent extends BaseRecordComponent {
}
if (row[column.property] !== '/') {
row.value = column.index - 1
+ this.countEstimateValue()
}
+
+ }
+
+ public countEstimateValue() {
+ let value: number = 0;
+ let len: number = 0;
+ let tmpRiskDatas = []
+ if (this.popTitle === 'L') {
+ tmpRiskDatas = this.riskLDatas
+ }
+ if (this.popTitle === 'S') {
+ tmpRiskDatas = this.riskSDatas
+ }
+ tmpRiskDatas.forEach((item: any) => {
+ if (item.value && typeof (item.value) === 'number') {
+ len = len + 1
+ value = value + item.value
+ }
+ })
+ tmpRiskDatas.forEach((item: any) => {
+ item.result = Math.round(value / len).toString()
+ })
}
public startEdit(row) {
@@ -274,7 +304,9 @@ export default class AreaAnalComponent extends BaseRecordComponent {
this.popTitle = 'S';
this.stepsActive = 2;
this.riskLDatas[0].value = value;
- this.riskSDatas = JSON.parse(JSON.stringify(riskSData));
+ if (this.riskSDatas.length === 0) {
+ this.riskSDatas = JSON.parse(JSON.stringify(riskSData));
+ }
this.updateBtn();
} else {
this.currentRow.analSeverityContent = content;
@@ -304,7 +336,7 @@ export default class AreaAnalComponent extends BaseRecordComponent {
//单选
public selectRadioData(data) {
- console.log('data', data);
+ // console.log('data', data);
}
//点击L 步骤
diff --git a/src/views/risk/assessment/work/work.component.vue b/src/views/risk/assessment/work/work.component.vue
index 2d78b88..7cf91bf 100644
--- a/src/views/risk/assessment/work/work.component.vue
+++ b/src/views/risk/assessment/work/work.component.vue
@@ -120,7 +120,7 @@ export default class WorkManagerComponent extends BaseRecordComponent {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
- hide:this.updateParams.id
+ hide: this.updateParams.id
}, {
name: "保存",
value: "save",
@@ -137,7 +137,7 @@ export default class WorkManagerComponent extends BaseRecordComponent {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
- hide:this.stepUpdateParams.index
+ hide: this.stepUpdateParams.index
}, {
name: "保存",
value: "save",
@@ -470,6 +470,7 @@ export default class WorkManagerComponent extends BaseRecordComponent {
}
this.showSubUpdate = true;
this.subUpdateActionsForm();
+ this.buildUpdateForm();
}
public doSubDelete(indexs) {
@@ -486,6 +487,10 @@ export default class WorkManagerComponent extends BaseRecordComponent {
public doSave(goOn?) {
+ if (this.updateParams.steps.length === 0) {
+ this.$message.warning("请您至少添加一条作业步骤!");
+ return
+ }
// 如果是新增步骤
if (this.showSubUpdate) {
// 新增
@@ -598,7 +603,7 @@ export default class WorkManagerComponent extends BaseRecordComponent {
this.toggleAll()
} else {
this.tableData.datas.forEach((item, index) => {
- const find = this.selectData.find((data: any) => data.userId === item.userId);
+ const find = this.selectData.find((data: any) => data.id === item.id);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}
diff --git a/src/views/workprogress/leader.component.vue b/src/views/workprogress/leader.component.vue
index 4a6f9e6..4d486d6 100644
--- a/src/views/workprogress/leader.component.vue
+++ b/src/views/workprogress/leader.component.vue
@@ -601,13 +601,13 @@ export default class LeadershipStructure extends BaseRecordComponent {
//删除成员
public deleteSubData(indexs) {
- if(indexs.length === 0){
+ if (indexs.length === 0) {
this.$message.warning("请选择要删除的数据!")
- }else{
+ } else {
this.$confirm('确认删除所选数据', '确认数据', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
}).then(() => {
for (let i = this.updateParams.members.length - 1; i >= 0; i--) {
if (indexs.includes(i)) {