fix:完善页面
This commit is contained in:
parent
eed04718d2
commit
5166ee2b68
|
@ -93,55 +93,37 @@
|
|||
type="primary"
|
||||
:loading="isSaving"
|
||||
@click="submitHandle()"
|
||||
>保 存</el-button
|
||||
>
|
||||
>保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import degraDialog from "../wf/degraD3.vue";
|
||||
export default {
|
||||
name: "index",
|
||||
// components: {
|
||||
// degraDialog
|
||||
// },
|
||||
name: "mroom",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.ofm.mroom.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
seal: [],
|
||||
seal_other: "",
|
||||
filename: "",
|
||||
contents: "",
|
||||
file_count: "",
|
||||
is_lending: "",
|
||||
contacts: "",
|
||||
lending_date: "",
|
||||
return_date: "",
|
||||
actual_return_date: "",
|
||||
reason: "",
|
||||
name: "",
|
||||
location: "",
|
||||
capacity: "",
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "请输入会议室名称", trigger: "blur" }],
|
||||
location: [{ required: true, message: "请输入地点", trigger: "blur" }],
|
||||
capacity: [{ required: true, message: "请输入容纳人数", trigger: "blur" }],
|
||||
},
|
||||
//验证规则
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -151,15 +133,12 @@ export default {
|
|||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
// 如果需要,也可以重置整个表单:
|
||||
// this.addForm = { lending_type: "", ...其他字段... };
|
||||
},
|
||||
this.limitedVisible = false;
|
||||
},
|
||||
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
that.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaving = true;
|
||||
that.submit();
|
||||
|
@ -168,16 +147,14 @@ export default {
|
|||
},
|
||||
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
let that = this,res = null;
|
||||
console.log('that.type',that.type);
|
||||
console.log('that.addForm',that.addForm);
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.ofm.mroom.create.req(that.addForm);
|
||||
} else {
|
||||
res = await that.$API.ofm.mroom.update.req(
|
||||
that.editId,
|
||||
that.addForm
|
||||
);
|
||||
res = await that.$API.ofm.mroom.update.req(that.addForm.id,that.addForm);
|
||||
}
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
|
@ -186,77 +163,32 @@ export default {
|
|||
that.isSaving = false;
|
||||
}
|
||||
},
|
||||
fileUPSuccess(res) {
|
||||
let that = this;
|
||||
console.log('res',res);
|
||||
this.test_file = res.path;
|
||||
},
|
||||
mroomEidt(row) {
|
||||
this.type = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
}
|
||||
let that = this;
|
||||
that.type = "edit";
|
||||
that.editId = row.id;
|
||||
that.limitedVisible = true;
|
||||
that.addForm = Object.assign({}, row);
|
||||
},
|
||||
async mroomDel(row) {
|
||||
let that = this;
|
||||
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) {
|
||||
this.$message.error(res.err_msg);
|
||||
that.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
that.$refs.table.refresh();
|
||||
that.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
};
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<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 {
|
||||
display: flex;
|
||||
|
|
Loading…
Reference in New Issue