|
@@ -8,6 +8,7 @@
|
|
|
:visible.sync="DialogVisible"
|
|
|
custom-class="abow_dialog"
|
|
|
label-position="left"
|
|
|
+ width="450px"
|
|
|
:dialogAttrs="{ 'close-on-click-modal': false,'top':'8vh'}"
|
|
|
/>
|
|
|
|
|
@@ -20,73 +21,47 @@ export default {
|
|
|
return {
|
|
|
formData: {},
|
|
|
formFieldsData: {
|
|
|
- id:"",
|
|
|
- is_used:"",
|
|
|
- department_id: "",
|
|
|
- number: "",
|
|
|
- name: "",
|
|
|
- model: "",
|
|
|
+ id: "",
|
|
|
+ plan_name:'',
|
|
|
+ wind_id:"",
|
|
|
fan_id:"",
|
|
|
- outside:"",
|
|
|
- torque:"",
|
|
|
- wrench:"",
|
|
|
- stress:"",
|
|
|
- bolt_size:"",
|
|
|
- bolt_number:"",
|
|
|
- install_position:"",
|
|
|
- brand:"",
|
|
|
- supplier:"",
|
|
|
- out_date:"",
|
|
|
- fastening_scheme:"",
|
|
|
- remark: "",
|
|
|
-
|
|
|
+ work_sign:"",
|
|
|
+ parts_sign:"",
|
|
|
+ boit_type_sign: "",
|
|
|
+ status:'',
|
|
|
+ info: "",
|
|
|
},
|
|
|
- url: "flange",
|
|
|
+ url: "workplan",
|
|
|
formConfig: {
|
|
|
formDesc: {
|
|
|
- is_used: {
|
|
|
- break:true,
|
|
|
- layout:12,
|
|
|
- type: "select",
|
|
|
- label: "使用状态",
|
|
|
+ plan_name: {
|
|
|
required: true,
|
|
|
- isOptions: true,
|
|
|
- options: [
|
|
|
- {
|
|
|
- text: "使用",
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- text: "未使用",
|
|
|
- value: -1
|
|
|
- },
|
|
|
- {
|
|
|
- text: "已废弃",
|
|
|
- value: -2
|
|
|
- }
|
|
|
- ]
|
|
|
+ type: "input",
|
|
|
+ label: "计划名称"
|
|
|
},
|
|
|
+ wind_id: {
|
|
|
|
|
|
- department_id: {
|
|
|
- layout:12,
|
|
|
type: "cascader",
|
|
|
- label: "所属部门",
|
|
|
+ label: "风场名称",
|
|
|
isOptions: true,
|
|
|
options: [],
|
|
|
required: true,
|
|
|
+ vif: true,
|
|
|
attrs: {
|
|
|
+ //查询
|
|
|
+ filterable: true,
|
|
|
props: {
|
|
|
- label: "department_name",
|
|
|
- value: "id",
|
|
|
+ label: "text",
|
|
|
+ value: "value",
|
|
|
emitPath: false,
|
|
|
- checkStrictly: true
|
|
|
-
|
|
|
+ multiple: false
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
//风场id
|
|
|
fan_id:{
|
|
|
- layout:12,
|
|
|
+
|
|
|
type: "cascader",
|
|
|
label: "风机编号",
|
|
|
isOptions: true,
|
|
@@ -97,7 +72,7 @@ export default {
|
|
|
//查询
|
|
|
filterable:true,
|
|
|
props: {
|
|
|
- label: "text",
|
|
|
+ label: "name",
|
|
|
value: "value",
|
|
|
emitPath: false,
|
|
|
multiple:false
|
|
@@ -105,160 +80,107 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- number: {
|
|
|
- layout:12,
|
|
|
- required:true,
|
|
|
- type: "input",
|
|
|
- label: "编号",
|
|
|
-
|
|
|
- },
|
|
|
- name: {
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "名称",
|
|
|
- required:true
|
|
|
- },
|
|
|
- model: {
|
|
|
- layout:12,
|
|
|
- required:true,
|
|
|
- type: "select",
|
|
|
- label: "型号",
|
|
|
- required:true,
|
|
|
- options:[]
|
|
|
- },
|
|
|
- outside:{
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "外径",
|
|
|
- required:true
|
|
|
- },
|
|
|
- torque:{
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "扭矩",
|
|
|
- required:true,
|
|
|
- rules: [
|
|
|
- {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
|
|
|
- ]
|
|
|
- },
|
|
|
- wrench:{
|
|
|
- layout:12,
|
|
|
- type: "select",
|
|
|
- label: "液压扳手",
|
|
|
- isOptions: true,
|
|
|
- options: [],
|
|
|
- required: true,
|
|
|
- attrs: {
|
|
|
- //查询
|
|
|
- filterable:true,
|
|
|
- multiple:true,
|
|
|
- props: {
|
|
|
- label: "text",
|
|
|
- value: "value",
|
|
|
- emitPath: false,
|
|
|
- checkStrictly: false,
|
|
|
- multiple:false
|
|
|
- }
|
|
|
+ parts_sign: {
|
|
|
+
|
|
|
+ type: "cascader",
|
|
|
+ label: "部件类型",
|
|
|
+ isOptions: true,
|
|
|
+ options: [],
|
|
|
+ required: true,
|
|
|
+ vif: true,
|
|
|
+ attrs: {
|
|
|
+ //查询
|
|
|
+ filterable: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "value",
|
|
|
+ emitPath: false,
|
|
|
+ multiple: false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- fastening_scheme:{
|
|
|
- layout:12,
|
|
|
- type: "select",
|
|
|
- label: "紧固方案",
|
|
|
- isOptions: true,
|
|
|
- options: [],
|
|
|
- required: true,
|
|
|
- attrs: {
|
|
|
- //查询
|
|
|
- filterable:true,
|
|
|
- multiple:true,
|
|
|
- props: {
|
|
|
- label: "text",
|
|
|
- value: "value",
|
|
|
- emitPath: false,
|
|
|
- checkStrictly: false,
|
|
|
- multiple:false
|
|
|
- }
|
|
|
+ work_sign: {
|
|
|
+
|
|
|
+ type: "cascader",
|
|
|
+ label: "工作位置",
|
|
|
+ isOptions: true,
|
|
|
+ options: [],
|
|
|
+ required: true,
|
|
|
+ vif: true,
|
|
|
+ attrs: {
|
|
|
+ //查询
|
|
|
+ filterable: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "value",
|
|
|
+ emitPath: false,
|
|
|
+ multiple: false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- stress:{
|
|
|
- layout:12,
|
|
|
- required: true,
|
|
|
- type: "input",
|
|
|
- label: "压力",
|
|
|
- rules: [
|
|
|
- {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
|
|
|
- ]
|
|
|
- },
|
|
|
- bolt_size: {
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "螺栓尺寸",
|
|
|
- rules: [
|
|
|
- {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
|
|
|
- ]
|
|
|
+ boit_type_sign: {
|
|
|
+
|
|
|
+ type: "cascader",
|
|
|
+ label: "螺栓型号",
|
|
|
+ isOptions: true,
|
|
|
+ options: [],
|
|
|
+ required: true,
|
|
|
+ vif: true,
|
|
|
+ attrs: {
|
|
|
+ //查询
|
|
|
+ filterable: true,
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "value",
|
|
|
+ emitPath: false,
|
|
|
+ multiple: false
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
- bolt_number: {
|
|
|
+ status: {
|
|
|
+ break: true,
|
|
|
+
|
|
|
+ type: "select",
|
|
|
+ label: "使用状态",
|
|
|
required: true,
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "螺栓数量",
|
|
|
- rules: [
|
|
|
-
|
|
|
- {pattern: /^[1-9]\d*$/,message: '请輸入正整数'}
|
|
|
-
|
|
|
+ isOptions: true,
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ text: "使用",
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "未使用",
|
|
|
+ value: -1
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
- install_position:{
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "安装位置",
|
|
|
- vif:true
|
|
|
- },
|
|
|
- brand: {
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "品牌"
|
|
|
- },
|
|
|
- supplier: {
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "供应商"
|
|
|
- },
|
|
|
- out_date: {
|
|
|
- layout:12,
|
|
|
- type: "date",
|
|
|
- label: "出厂日期"
|
|
|
- },
|
|
|
- remark: {
|
|
|
+ info: {
|
|
|
type: "textarea",
|
|
|
label: "备注"
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
- order: ["is_used","model","department_id","fan_id","number", "name","outside","wrench","torque","fastening_scheme","stress","bolt_size","bolt_number","install_position","brand","supplier","out_date","remark"]
|
|
|
+ order: ["plan_name", "wind_id", "fan_id", "parts_sign", "work_sign", "boit_type_sign", "status","info"]
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- // this.$http.get("departments").then(response => {
|
|
|
- // this.formConfig.formDesc.department_id.options = response.data;
|
|
|
- // });
|
|
|
-
|
|
|
- // this.$http.get("getwindfan").then(response => {
|
|
|
- // this.formConfig.formDesc.fan_id.options = response.data;
|
|
|
- // });
|
|
|
- // this.$http.get("get_device_mold",{ params: {type:2} }).then(resp => {
|
|
|
- // this.formConfig.formDesc.model.options = resp.data
|
|
|
- // });
|
|
|
- // this.$http.get("wrenchtype").then(response => {
|
|
|
- // this.formConfig.formDesc.wrench.options = response.data;
|
|
|
- // });
|
|
|
- // this.$http.get("synschemetype").then(response => {
|
|
|
- // this.formConfig.formDesc.fastening_scheme.options = response.data;
|
|
|
- // });
|
|
|
-
|
|
|
+ this.$http.get("wind/getWindOptions").then((response) => {
|
|
|
+ this.formConfig.formDesc.wind_id.options = response.data;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$http.get("get_mainten_option?type=" + "2").then((response) => {
|
|
|
+ this.formConfig.formDesc.work_sign.options = response.data;
|
|
|
+ });
|
|
|
+ this.$http.get("get_mainten_option?type=" + "1").then((response) => {
|
|
|
+ this.formConfig.formDesc.parts_sign.options = response.data;
|
|
|
+ });
|
|
|
+ this.$http.get("get_mainten_option?type=" + "4").then((response) => {
|
|
|
+ this.formConfig.formDesc.boit_type_sign.options = response.data;
|
|
|
+ });
|
|
|
|
|
|
|
|
|
},
|
|
@@ -281,20 +203,7 @@ export default {
|
|
|
this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
|
|
|
},
|
|
|
get() {
|
|
|
- if(this.formModelVisible)
|
|
|
- {
|
|
|
-
|
|
|
- if(!this.formFieldsData.id)
|
|
|
- {
|
|
|
- this.formConfig.formDesc.fan_id.vif=false;
|
|
|
- this.formConfig.formDesc.install_position.vif=false;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- this.formConfig.formDesc.fan_id.vif=true;
|
|
|
- this.formConfig.formDesc.install_position.vif=false;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
return this.formModelVisible; // 表示获取父组件的值
|
|
|
}
|
|
|
}
|