From 28f1104e32c40273778eed24392bbf14ce03e7fe Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期六, 16 八月 2025 09:34:43 +0800
Subject: [PATCH] 安灯模块,相关功能表单页面样式调整
---
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue | 124 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 124 insertions(+), 0 deletions(-)
diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue
new file mode 100644
index 0000000..eef3d6b
--- /dev/null
+++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationForm.vue
@@ -0,0 +1,124 @@
+<template>
+ <a-spin :spinning="confirmLoading">
+ <j-form-container :disabled="formDisabled">
+ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+ <a-row>
+ <a-col :span="24">
+ <a-form-model-item label="璁惧缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
+ <a-input v-model="model.equipmentid" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="24">
+ <a-form-model-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentname">
+ <a-input v-model="model.equipmentname" placeholder="璇疯緭鍏ヨ澶囧悕绉�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="24">
+ <a-form-model-item label="鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startdate">
+ <j-date placeholder="璇烽�夋嫨鏃堕棿" v-model="model.startdate" style="width: 100%" />
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="24">
+ <a-form-model-item label="鎵煩鍊�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="torquevalue">
+ <a-input v-model="model.torquevalue" placeholder="璇疯緭鍏ユ壄鐭╁��" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="24">
+ <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
+ <a-input v-model="model.notes" placeholder="璇疯緭鍏ュ娉�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ </a-row>
+ </a-form-model>
+ </j-form-container>
+ </a-spin>
+</template>
+
+<script>
+
+ import { httpAction, getAction } from '@/api/manage'
+ import { validateDuplicateValue } from '@/utils/util'
+
+ export default {
+ name: 'TorqueconfigurationForm',
+ components: {
+ },
+ props: {
+ //琛ㄥ崟绂佺敤
+ disabled: {
+ type: Boolean,
+ default: false,
+ required: false
+ }
+ },
+ data () {
+ return {
+ model:{
+ },
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 5 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
+ confirmLoading: false,
+ validatorRules: {
+ },
+ url: {
+ add: "/torquec/torqueconfiguration/add",
+ edit: "/torquec/torqueconfiguration/edit",
+ queryById: "/torquec/torqueconfiguration/queryById"
+ }
+ }
+ },
+ computed: {
+ formDisabled(){
+ return this.disabled
+ },
+ },
+ created () {
+ //澶囦唤model鍘熷鍊�
+ this.modelDefault = JSON.parse(JSON.stringify(this.model));
+ },
+ methods: {
+ add () {
+ this.edit(this.modelDefault);
+ },
+ edit (record) {
+ this.model = Object.assign({}, record);
+ this.visible = true;
+ },
+ submitForm () {
+ const that = this;
+ // 瑙﹀彂琛ㄥ崟楠岃瘉
+ this.$refs.form.validate(valid => {
+ if (valid) {
+ that.confirmLoading = true;
+ let httpurl = '';
+ let method = '';
+ if(!this.model.id){
+ httpurl+=this.url.add;
+ method = 'post';
+ }else{
+ httpurl+=this.url.edit;
+ method = 'put';
+ }
+ httpAction(httpurl,this.model,method).then((res)=>{
+ if(res.success){
+ that.$message.success(res.message);
+ that.$emit('ok');
+ }else{
+ that.$message.warning(res.message);
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ })
+ }
+
+ })
+ },
+ }
+ }
+</script>
\ No newline at end of file
--
Gitblit v1.9.3