123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <ele-form-dialog
- 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'}"
- />
- </template>
- <script>
- export default {
- props: ["formModelVisible", "title"],
- data() {
- return {
- formData: {},
- formFieldsData: {
- id:"",
- number: "",
- fan_id:"",
- work_location:"",
- parts:"",
- bolt_style:"",
- boit_type:"",
- info: "",
- },
- url: "workLocation",
- formConfig: {
- formDesc: {
- //风场id
- fan_id:{
- type: "cascader",
- label: "风机编号",
- isOptions: true,
- options: [],
- required: true,
- vif:true,
- attrs: {
- //查询
- filterable:true,
- props: {
- label: "text",
- value: "value",
- emitPath: false,
- multiple:false
- }
- }
- },
- number: {
- required:true,
- type: "input",
- label: "编号",
-
- },
- work_location: {
-
- type: "input",
- label: "工作位置",
- required:true
- },
- parts: {
-
- required:true,
- type: "select",
- label: "所属部件",
- required:true,
- options:[]
- },
- bolt_style:{
-
- type: "input",
- label: "螺丝样式",
- required:true
- },
- boit_type:{
-
- type: "input",
- label: "螺丝型号",
- required:true,
- rules: [
- {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
- ]
- },
- info: {
-
- type: "textarea",
- label: "备注"
- }
- },
- order: ["number","fan_id","work_location","parts","bolt_style", "boit_type","info","info"]
- }
- };
- },
- created() {
-
- // 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;
- // });
- },
- methods: {
- handleFormSubmit(data) {
- this.$parent.handleSubmit();
- },
- handleRequest(data) {
- return Promise.resolve();
- },
- handleRequestSuccess() {
- this.$message.success("发送成功");
- }
- },
- computed: {
- DialogVisible: {
- set(val) {
- this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
- },
- get() {
- return this.formModelVisible; // 表示获取父组件的值
- }
- }
- }
- };
- </script>
|