138 lines
3.7 KiB
Vue
138 lines
3.7 KiB
Vue
<!--
|
|
* @Author: zwq
|
|
* @Date: 2023-01-04 10:29:40
|
|
* @LastEditors: zhp
|
|
* @LastEditTime: 2023-07-10 11:01:12
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
|
<el-form-item prop="name" :label="$t('basic.name')">
|
|
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
|
|
</el-form-item>
|
|
<el-form-item prop="code" :label="$t('basic.code')">
|
|
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</template>
|
|
|
|
<script>
|
|
import debounce from "lodash/debounce";
|
|
import basicAdd from "@/mixins/basic-add";
|
|
export default {
|
|
mixins: [basicAdd],
|
|
data() {
|
|
return {
|
|
// urlOptions: {
|
|
// submitURL: "/sys/params/",
|
|
// infoURL: "/sys/params",
|
|
// },
|
|
urlOptions: {
|
|
getCustomerPageListURL: "/quality/qmsTransferScheme/page"
|
|
},
|
|
visible: false,
|
|
customerTypeList:{},
|
|
dataForm: {
|
|
name: null,
|
|
code:null
|
|
}
|
|
};
|
|
},
|
|
computed: {
|
|
// dataRule() {
|
|
// return {
|
|
// paramCode: [
|
|
// {
|
|
// required: true,
|
|
// message: this.$t("validate.required"),
|
|
// trigger: "blur",
|
|
// },
|
|
// ],
|
|
// paramValue: [
|
|
// {
|
|
// required: true,
|
|
// message: this.$t("validate.required"),
|
|
// trigger: "blur",
|
|
// },
|
|
// ],
|
|
// };
|
|
// },
|
|
},
|
|
methods: {
|
|
// init(id) {
|
|
// this.dataForm.id = id || "";
|
|
// this.visible = true;
|
|
// this.$nextTick(() => {
|
|
// this.$refs["dataForm"].resetFields();
|
|
// if (this.dataForm.id) {
|
|
// this.getInfo();
|
|
// }
|
|
// });
|
|
// },
|
|
// 获取信息
|
|
// getInfo() {
|
|
// this.$http
|
|
// .get(`/sys/params/${this.dataForm.id}`)
|
|
// .then(({ data: res }) => {
|
|
// if (res.code !== 0) {
|
|
// return this.$message.error(res.msg);
|
|
// }
|
|
// this.dataForm = {
|
|
// ...this.dataForm,
|
|
// ...res.data,
|
|
// };
|
|
// })
|
|
// .catch(() => {});
|
|
// },
|
|
// 表单提交
|
|
// getDict() {
|
|
// this.$http
|
|
// .get(this.urlOptions.getCustomerPageListURL, {
|
|
// params: this.listQuery,
|
|
// })
|
|
// .then(({ data: res }) => {
|
|
// this.dataListLoading = false;
|
|
// if (res.code !== 0) {
|
|
// this.customerTypeList = res.data
|
|
// }
|
|
// })
|
|
// },
|
|
handleConditionSearch() {
|
|
this.$emit("successSubmit", this.dataForm);
|
|
},
|
|
// dataFormSubmitHandle: debounce(
|
|
// function () {
|
|
// // console.log(1111);
|
|
// // this.visible = false;
|
|
// this.$emit("successSubmit", this.dataForm.key);
|
|
// // this.$refs["dataForm"].validate((valid) => {
|
|
// // if (!valid) {
|
|
// // return false;
|
|
// // }
|
|
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
|
// // "/sys/params",
|
|
// // this.dataForm
|
|
// // )
|
|
// // .then(({ data: res }) => {
|
|
// // if (res.code !== 0) {
|
|
// // return this.$message.error(res.msg);
|
|
// // }
|
|
// // this.$message({
|
|
// // message: this.$t("prompt.success"),
|
|
// // type: "success",
|
|
// // duration: 500,
|
|
// // onClose: () => {
|
|
|
|
// // },
|
|
// // });
|
|
// // })
|
|
// // .catch(() => {});
|
|
// // });
|
|
// },
|
|
// 1000,
|
|
// { leading: true, trailing: false }
|
|
// ),
|
|
},
|
|
};
|
|
</script>
|