fix:完善页面

This commit is contained in:
shijing 2025-09-24 09:39:37 +08:00
parent eed04718d2
commit 5166ee2b68
1 changed files with 29 additions and 97 deletions

View File

@ -93,55 +93,37 @@
type="primary" type="primary"
:loading="isSaving" :loading="isSaving"
@click="submitHandle()" @click="submitHandle()"
> </el-button > </el-button>
>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
// import degraDialog from "../wf/degraD3.vue";
export default { export default {
name: "index", name: "mroom",
// components: {
// degraDialog
// },
data() { data() {
return { return {
workflowName:"",
workFlowId:'',
apiObj: this.$API.ofm.mroom.list, apiObj: this.$API.ofm.mroom.list,
selection: [],
checkList: [],
fileList: [],
timeRange: [],
lending_type: "",
query: {}, query: {},
editId: null, editId: null,
isSaving: false, isSaving: false,
limitedVisible: false, limitedVisible: false,
limitedWatch: false,
type: "add", type: "add",
titleMap: { titleMap: {
add: "新增", add: "新增",
edit: "编辑", edit: "编辑",
show: "查看", show: "查看",
}, },
//
addForm: { addForm: {
seal: [], name: "",
seal_other: "", location: "",
filename: "", capacity: "",
contents: "", },
file_count: "", rules: {
is_lending: "", name: [{ required: true, message: "请输入会议室名称", trigger: "blur" }],
contacts: "", location: [{ required: true, message: "请输入地点", trigger: "blur" }],
lending_date: "", capacity: [{ required: true, message: "请输入容纳人数", trigger: "blur" }],
return_date: "",
actual_return_date: "",
reason: "",
}, },
//
}; };
}, },
methods: { methods: {
@ -151,15 +133,12 @@ export default {
this.limitedVisible = true; this.limitedVisible = true;
}, },
handleCancel() { handleCancel() {
this.limitedVisible = false; // this.limitedVisible = false;
this.lending_type = ""; // lending_type },
//
// this.addForm = { lending_type: "", ...... };
},
submitHandle() { submitHandle() {
let that = this; let that = this;
this.$refs.addForm.validate((valid) => { that.$refs.addForm.validate((valid) => {
if (valid) { if (valid) {
that.isSaving = true; that.isSaving = true;
that.submit(); that.submit();
@ -168,16 +147,14 @@ export default {
}, },
async submit() { async submit() {
let that = this; let that = this,res = null;
let 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);
} else { } else {
res = await that.$API.ofm.mroom.update.req( res = await that.$API.ofm.mroom.update.req(that.addForm.id,that.addForm);
that.editId,
that.addForm
);
} }
that.isSaving = false; that.isSaving = false;
that.limitedVisible = false; that.limitedVisible = false;
@ -186,77 +163,32 @@ export default {
that.isSaving = false; that.isSaving = false;
} }
}, },
fileUPSuccess(res) {
let that = this;
console.log('res',res);
this.test_file = res.path;
},
mroomEidt(row) { mroomEidt(row) {
this.type = "edit"; let that = this;
this.editId = row.id; that.type = "edit";
this.limitedVisible = true; that.editId = row.id;
this.addForm = Object.assign({}, row); that.limitedVisible = true;
} that.addForm = Object.assign({}, row);
}, },
async mroomDel(row) { async mroomDel(row) {
let that = this;
var id = row.id; var id = row.id;
var res = await this.$API.ofm.mroom.delete.req(id); var res = await that.$API.ofm.mroom.delete.req(id);
if (res.err_msg) { if (res.err_msg) {
this.$message.error(res.err_msg); that.$message.error(res.err_msg);
} else { } else {
this.$refs.table.refresh(); that.$refs.table.refresh();
this.$message.success("删除成功"); that.$message.success("删除成功");
} }
}, },
// //
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query); this.$refs.table.queryData(this.query);
}, },
}; },
}
</script> </script>
<style scoped> <style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group { .left-panel-group {
display: flex; display: flex;