|
@@ -1,12 +1,14 @@
|
|
|
<template>
|
|
|
<ele-form-dialog
|
|
|
- v-bind="formConfig"
|
|
|
+ v-bind="formConfig"
|
|
|
v-model="formFieldsData"
|
|
|
v-dialogDrag
|
|
|
:title="title"
|
|
|
:request-fn="handleFormSubmit"
|
|
|
:visible.sync="DialogVisible"
|
|
|
+ width="550px"
|
|
|
custom-class="abow_dialog"
|
|
|
+ label-width="100px"
|
|
|
label-position="left"
|
|
|
:dialogAttrs="{ 'close-on-click-modal': false,'top':'8vh'}"
|
|
|
/>
|
|
@@ -21,72 +23,20 @@ export default {
|
|
|
formData: {},
|
|
|
formFieldsData: {
|
|
|
id:"",
|
|
|
- is_used:"",
|
|
|
- department_id: "",
|
|
|
number: "",
|
|
|
- name: "",
|
|
|
- model: "",
|
|
|
fan_id:"",
|
|
|
- outside:"",
|
|
|
- torque:"",
|
|
|
- wrench:"",
|
|
|
- stress:"",
|
|
|
- bolt_size:"",
|
|
|
- bolt_number:"",
|
|
|
- install_position:"",
|
|
|
- brand:"",
|
|
|
- supplier:"",
|
|
|
- out_date:"",
|
|
|
- fastening_scheme:"",
|
|
|
- remark: "",
|
|
|
+ work_location:"",
|
|
|
+ parts:"",
|
|
|
+ bolt_style:"",
|
|
|
+ boit_type:"",
|
|
|
+ info: "",
|
|
|
|
|
|
},
|
|
|
- url: "flange",
|
|
|
+ url: "workLocation",
|
|
|
formConfig: {
|
|
|
formDesc: {
|
|
|
- is_used: {
|
|
|
- break:true,
|
|
|
- layout:12,
|
|
|
- type: "select",
|
|
|
- label: "使用状态",
|
|
|
- required: true,
|
|
|
- isOptions: true,
|
|
|
- options: [
|
|
|
- {
|
|
|
- text: "使用",
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- text: "未使用",
|
|
|
- value: -1
|
|
|
- },
|
|
|
- {
|
|
|
- text: "已废弃",
|
|
|
- value: -2
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- department_id: {
|
|
|
- layout:12,
|
|
|
- type: "cascader",
|
|
|
- label: "所属部门",
|
|
|
- isOptions: true,
|
|
|
- options: [],
|
|
|
- required: true,
|
|
|
- attrs: {
|
|
|
- props: {
|
|
|
- label: "department_name",
|
|
|
- value: "id",
|
|
|
- emitPath: false,
|
|
|
- checkStrictly: true
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
//风场id
|
|
|
fan_id:{
|
|
|
- layout:12,
|
|
|
type: "cascader",
|
|
|
label: "风机编号",
|
|
|
isOptions: true,
|
|
@@ -105,159 +55,65 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- number: {
|
|
|
- layout:12,
|
|
|
+ number: {
|
|
|
required:true,
|
|
|
type: "input",
|
|
|
label: "编号",
|
|
|
|
|
|
},
|
|
|
- name: {
|
|
|
- layout:12,
|
|
|
+ work_location: {
|
|
|
+
|
|
|
type: "input",
|
|
|
- label: "名称",
|
|
|
+ label: "工作位置",
|
|
|
required:true
|
|
|
},
|
|
|
- model: {
|
|
|
- layout:12,
|
|
|
+ parts: {
|
|
|
+
|
|
|
required:true,
|
|
|
type: "select",
|
|
|
- label: "型号",
|
|
|
+ label: "所属部件",
|
|
|
required:true,
|
|
|
options:[]
|
|
|
},
|
|
|
- outside:{
|
|
|
- layout:12,
|
|
|
+ bolt_style:{
|
|
|
+
|
|
|
type: "input",
|
|
|
- label: "外径",
|
|
|
+ label: "螺丝样式",
|
|
|
required:true
|
|
|
},
|
|
|
- torque:{
|
|
|
- layout:12,
|
|
|
+ boit_type:{
|
|
|
+
|
|
|
type: "input",
|
|
|
- label: "扭矩",
|
|
|
+ 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
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- 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
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- 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: '请輸入正数,最多保存两位小数'}
|
|
|
- ]
|
|
|
- },
|
|
|
- bolt_number: {
|
|
|
- required: true,
|
|
|
- layout:12,
|
|
|
- type: "input",
|
|
|
- label: "螺栓数量",
|
|
|
- rules: [
|
|
|
-
|
|
|
- {pattern: /^[1-9]\d*$/,message: '请輸入正整数'}
|
|
|
-
|
|
|
- ]
|
|
|
- },
|
|
|
- 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: ["number","fan_id","work_location","parts","bolt_style", "boit_type","info","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("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;
|
|
|
+ // });
|
|
|
|
|
|
|
|
|
|
|
@@ -275,26 +131,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+
|
|
|
computed: {
|
|
|
DialogVisible: {
|
|
|
set(val) {
|
|
|
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; // 表示获取父组件的值
|
|
|
}
|
|
|
}
|