feat: ofm-- 修改form 表单

This commit is contained in:
TianyangZhang 2025-11-10 10:56:06 +08:00
parent b52985a844
commit a7cd474940
9 changed files with 25 additions and 16 deletions

View File

@ -118,6 +118,9 @@ export default {
let that = this; let that = this;
if (that.t_id){ if (that.t_id){
this.getTid(); this.getTid();
}else {
that.localMode = "add";
that.addForm.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
}; };
}, },
watch: { watch: {

View File

@ -148,8 +148,6 @@ export default {
async submit() { async submit() {
let that = this,res = null; let that = this,res = null;
console.log('that.type',that.type);
console.log('that.addForm',that.addForm);
try { try {
if (that.type === "add") { if (that.type === "add") {
res = await that.$API.ofm.mroom.create.req(that.addForm); res = await that.$API.ofm.mroom.create.req(that.addForm);

View File

@ -186,11 +186,13 @@ export default {
let that = this; let that = this;
if (that.t_id) { if (that.t_id) {
that.getTid(); that.getTid();
}; }else {
that.localMode = "add";
that.addForm.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
}
}, },
watch: { watch: {
'addForm.dept_opinion'(val) { 'addForm.dept_opinion'(val) {
console.log('addForm.dept_opinion 发生变化',val)
this.ticket_data.dept_opinion = val this.ticket_data.dept_opinion = val
}, },
'addForm.secret_period'(val) { 'addForm.secret_period'(val) {
@ -200,14 +202,12 @@ export default {
this.ticket_data.secret_level = val this.ticket_data.secret_level = val
}, },
'addForm.disposal_method'(val) { 'addForm.disposal_method'(val) {
console.log('addForm.disposal_method 发生变化',val)
this.ticket_data.disposal_method = val this.ticket_data.disposal_method = val
}, },
'addForm.dept_opinion_review'(val) { 'addForm.dept_opinion_review'(val) {
this.ticket_data.dept_opinion_review = val this.ticket_data.dept_opinion_review = val
}, },
'addForm.publicity_opinion'(val) { 'addForm.publicity_opinion'(val) {
console.log('addForm.publicity_opinion 发生变化',val)
this.ticket_data.publicity_opinion = val this.ticket_data.publicity_opinion = val
}, },
deep:true deep:true

View File

@ -140,6 +140,9 @@ export default {
let that = this; let that = this;
if (that.t_id) { if (that.t_id) {
that.getTid(); that.getTid();
}else {
that.localMode = "add";
that.localForm.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
} }
}, },
watch: { watch: {

View File

@ -42,7 +42,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
unlink-panels unlink-panels
placeholder="选择日期" placeholder="选择日期"
:disabled="mode==='show'" :disabled="localMode==='show'"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -111,6 +111,9 @@ export default {
let that = this; let that = this;
if (that.t_id) { if (that.t_id) {
that.getTid(); that.getTid();
}else {
that.localMode = "add";
that.addForm.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
} }
}, },
watch: { watch: {

View File

@ -144,7 +144,10 @@ export default {
let that = this; let that = this;
if (that.t_id) { if (that.t_id) {
that.getTid(); that.getTid();
} }else {
that.localMode = "add";
that.localForm.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
};
}, },
methods: { methods: {
async submit_b_func() { async submit_b_func() {

View File

@ -155,7 +155,10 @@ export default {
let that = this; let that = this;
if (that.t_id) { if (that.t_id) {
that.getTid(); that.getTid();
} }else {
that.localMode = "add";
that.localForm.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
};
}, },
methods: { methods: {
async submit_b_func() { async submit_b_func() {

View File

@ -72,7 +72,6 @@
size="small" size="small"
type="primary" type="primary"
@click="paperseEdit(scope.row)" @click="paperseEdit(scope.row)"
v-auth="'PaperSe.update'"
>详情 >详情
</el-button> </el-button>
<el-popconfirm <el-popconfirm

View File

@ -122,9 +122,6 @@ export default {
...(this.modelValue || {}) } ...(this.modelValue || {}) }
}; };
}, },
mounted() {
console.log('mode', this.localMode)
},
watch: { watch: {
localForm: { localForm: {
handler(val) { handler(val) {