123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <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'}"
- >
-
- </ele-form-dialog>
- </template>
- <script>
- export default {
- props: ["formModelVisible", "title"],
- data() {
- return {
- url: "fan",
- formData: {},
-
-
- formFieldsData: {
- wind_id: "",
- fan_model:"",
- info: "",
- supplier:"",
- out_date:"",
- address:"",
- number:"",
- },
- formConfig: {
- formDesc: {
- wind_id: {
- type: "select",
- label: "所属风场",
- options: [],
- required: true,
-
- },
- fan_model: {
- type: "select",
- label: "型号",
- required:true,
- options: [],
- },
- supplier: {
- type: "input",
- label: "供应商",
-
- },
- out_date: {
- type: "date",
- label: "出厂日期",
-
- },
- address: {
- type: "input",
- label: "地址",
- },
- number: {
- type: "input",
- label: "机位号",
- },
- info: {
- type: "textarea",
- label: "备注",
- },
-
- },
- order: ["wind_id","fan_model","supplier","out_date","address", "number","info"]
- }
- };
- },
- created() {
- this.$http.get("wind/getWindOptions").then(response => {
- this.formConfig.formDesc.wind_id.options = response.data;
- });
- // 4-风机
- this.$http.get("get_device_mold",{ params: {type:4} }).then(resp => {
- this.formConfig.formDesc.fan_model.options = resp.data
- });
- },
- methods: {
- handleFormSubmit(data) {
- this.formFieldsData.rule_data=this.rule_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>
- <style lang="scss" scoped>
- .form-item1{
- width:110px;
- margin-right: 5px;
- margin-bottom: 5px;
- }
- </style>
|