Compare commits
No commits in common. "c87363a58ae77512c5f080db0831f723a3c26ea6" and "b37296f460a666336b1b9c21430a96fb5d64b51d" have entirely different histories.
c87363a58a
...
b37296f460
|
|
@ -1,240 +0,0 @@
|
||||||
import config from "@/config"
|
|
||||||
import http from "@/utils/request"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
lendingseal: {
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/lendingseal/`,
|
|
||||||
name: "印章列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "印章详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get( `${config.API_URL}/ofm/lendingseal/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/lendingseal/`,
|
|
||||||
name: "新增印章使用记录",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新印章使用记录",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/ofm/lendingseal/${id}/`,
|
|
||||||
data
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除印章管理",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(`${config.API_URL}/ofm/lendingseal/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mroom: {
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/mroom/`,
|
|
||||||
name: "会议室列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "会议室详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get(`${config.API_URL}/ofm/mroom/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/mroom/`,
|
|
||||||
name: "新增会议室",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
url: `${config.API_URL}/ofm/mroom/delete/`,
|
|
||||||
name: "批量物理删除",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mroombooking: {
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/mroombooking/`,
|
|
||||||
name: "会议室预订列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "会议室预订详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get(`${config.API_URL}/ofm/mroombooking/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/mroombooking/`,
|
|
||||||
name: "新增会议室预订",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
url: `${config.API_URL}/ofm/mroombooking/delete/`,
|
|
||||||
name: "批量物理删除",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mroomslot: {
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/mroomslot/`,
|
|
||||||
name: "会议室预订时段列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "会议室预订时段详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get(`${config.API_URL}/ofm/mroomslot/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/mroomslot/`,
|
|
||||||
name: "新增会议室预订时段",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
url: `${config.API_URL}/ofm/mroomslot/delete/`,
|
|
||||||
name: "批量物理删除",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
field:{
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/customfield/`,
|
|
||||||
name: "字段列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "字段详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get( `${config.API_URL}/ofm/customfield/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/customfield/`,
|
|
||||||
name: "新增字段",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新字段",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/ofm/customfield/${id}/`,
|
|
||||||
data
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除字段",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(`${config.API_URL}/ofm/customfield/${id}/`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
state:{
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/state/`,
|
|
||||||
name: "状态列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "状态详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get( `${config.API_URL}/ofm/state/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/state/`,
|
|
||||||
name: "新增状态",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新状态",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/ofm/state/${id}/`,
|
|
||||||
data
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除状态",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(`${config.API_URL}/ofm/state/${id}/`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
transition:{
|
|
||||||
list: {
|
|
||||||
url: `${config.API_URL}/ofm/transition/`,
|
|
||||||
name: "流转列表",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.get(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
name: "流转详情",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get( `${config.API_URL}/ofm/transition/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
url: `${config.API_URL}/ofm/transition/`,
|
|
||||||
name: "新增流转",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(this.url, data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新流转",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/ofm/transition/${id}/`,
|
|
||||||
data
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除流转",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(`${config.API_URL}/ofm/transition/${id}/`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,268 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-container>
|
|
||||||
<el-header>
|
|
||||||
<div class="left-panel-group">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
<div class="right-panel">
|
|
||||||
<el-input
|
|
||||||
v-model="query.search"
|
|
||||||
placeholder="会议室名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
></el-input>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleQuery"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
|
||||||
<el-table-column label="#" type="index"></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="会议室名称"
|
|
||||||
prop="name"
|
|
||||||
min-width="100"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="位置"
|
|
||||||
prop="location"
|
|
||||||
min-width="100"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="容纳人数"
|
|
||||||
prop="capacity"
|
|
||||||
min-width="120"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
type="primary"
|
|
||||||
@click="mroomEidt(scope.row)"
|
|
||||||
>编辑
|
|
||||||
</el-button>
|
|
||||||
<el-popconfirm
|
|
||||||
title="确定删除吗?"
|
|
||||||
@confirm="mroomDel(scope.row)"
|
|
||||||
>
|
|
||||||
<template #reference>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-popconfirm>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
<el-dialog :title="titleMap[type] " v-model="limitedVisible" width="600px">
|
|
||||||
<el-form
|
|
||||||
:model="addForm"
|
|
||||||
:rules="rules"
|
|
||||||
ref="addForm"
|
|
||||||
label-width="100px"
|
|
||||||
label-position="left"
|
|
||||||
>
|
|
||||||
<el-form-item label="会议室名称" prop="name">
|
|
||||||
<el-input v-model="addForm.name" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="地点" prop="location">
|
|
||||||
<el-input v-model="addForm.location" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="容纳人数" prop="capacity">
|
|
||||||
<el-input v-model="addForm.capacity" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="handleCancel">取 消</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="type !== 'show'"
|
|
||||||
type="primary"
|
|
||||||
:loading="isSaving"
|
|
||||||
@click="submitHandle()"
|
|
||||||
>保 存</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// import degraDialog from "../wf/degraD3.vue";
|
|
||||||
export default {
|
|
||||||
name: "index",
|
|
||||||
// components: {
|
|
||||||
// degraDialog
|
|
||||||
// },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
workflowName:"",
|
|
||||||
workFlowId:'',
|
|
||||||
apiObj: this.$API.wf.workflow.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: "",
|
|
||||||
},
|
|
||||||
//验证规则
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//添加工作流
|
|
||||||
handleAdd() {
|
|
||||||
this.type = "add";
|
|
||||||
this.limitedVisible = true;
|
|
||||||
},
|
|
||||||
handleCancel() {
|
|
||||||
this.limitedVisible = false; // 关闭弹窗
|
|
||||||
this.lending_type = ""; // 重置 lending_type
|
|
||||||
// 如果需要,也可以重置整个表单:
|
|
||||||
// this.addForm = { lending_type: "", ...其他字段... };
|
|
||||||
},
|
|
||||||
|
|
||||||
submitHandle() {
|
|
||||||
let that = this;
|
|
||||||
this.$refs.addForm.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
that.isSaving = true;
|
|
||||||
that.submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
async submit() {
|
|
||||||
let that = this;
|
|
||||||
let res = null;
|
|
||||||
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
|
|
||||||
);
|
|
||||||
}
|
|
||||||
that.isSaving = false;
|
|
||||||
that.limitedVisible = false;
|
|
||||||
that.$refs.table.refresh();
|
|
||||||
} catch (e) {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mroomDel(row) {
|
|
||||||
var id = row.id;
|
|
||||||
var res = await this.$API.ofm.mroom.delete.req(id);
|
|
||||||
if (res.err_msg) {
|
|
||||||
this.$message.error(res.err_msg);
|
|
||||||
} else {
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
this.$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;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
|
||||||
margin-left: 0; /* 靠左 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
@ -1,268 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-container>
|
|
||||||
<el-header>
|
|
||||||
<div class="left-panel-group">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
<div class="right-panel">
|
|
||||||
<el-input
|
|
||||||
v-model="query.search"
|
|
||||||
placeholder="会议室名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
></el-input>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleQuery"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
|
||||||
<el-table-column label="#" type="index"></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="会议室名称"
|
|
||||||
prop="name"
|
|
||||||
min-width="100"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="位置"
|
|
||||||
prop="location"
|
|
||||||
min-width="100"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="容纳人数"
|
|
||||||
prop="capacity"
|
|
||||||
min-width="120"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
type="primary"
|
|
||||||
@click="mroomEidt(scope.row)"
|
|
||||||
>编辑
|
|
||||||
</el-button>
|
|
||||||
<el-popconfirm
|
|
||||||
title="确定删除吗?"
|
|
||||||
@confirm="mroomDel(scope.row)"
|
|
||||||
>
|
|
||||||
<template #reference>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-popconfirm>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
<el-dialog :title="titleMap[type] " v-model="limitedVisible" width="600px">
|
|
||||||
<el-form
|
|
||||||
:model="addForm"
|
|
||||||
:rules="rules"
|
|
||||||
ref="addForm"
|
|
||||||
label-width="100px"
|
|
||||||
label-position="left"
|
|
||||||
>
|
|
||||||
<el-form-item label="会议室名称" prop="name">
|
|
||||||
<el-input v-model="addForm.name" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="地点" prop="location">
|
|
||||||
<el-input v-model="addForm.location" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="容纳人数" prop="capacity">
|
|
||||||
<el-input v-model="addForm.capacity" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="handleCancel">取 消</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="type !== 'show'"
|
|
||||||
type="primary"
|
|
||||||
:loading="isSaving"
|
|
||||||
@click="submitHandle()"
|
|
||||||
>保 存</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// import degraDialog from "../wf/degraD3.vue";
|
|
||||||
export default {
|
|
||||||
name: "index",
|
|
||||||
// components: {
|
|
||||||
// degraDialog
|
|
||||||
// },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
workflowName:"",
|
|
||||||
workFlowId:'',
|
|
||||||
apiObj: this.$API.wf.workflow.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: "",
|
|
||||||
},
|
|
||||||
//验证规则
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//添加工作流
|
|
||||||
handleAdd() {
|
|
||||||
this.type = "add";
|
|
||||||
this.limitedVisible = true;
|
|
||||||
},
|
|
||||||
handleCancel() {
|
|
||||||
this.limitedVisible = false; // 关闭弹窗
|
|
||||||
this.lending_type = ""; // 重置 lending_type
|
|
||||||
// 如果需要,也可以重置整个表单:
|
|
||||||
// this.addForm = { lending_type: "", ...其他字段... };
|
|
||||||
},
|
|
||||||
|
|
||||||
submitHandle() {
|
|
||||||
let that = this;
|
|
||||||
this.$refs.addForm.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
that.isSaving = true;
|
|
||||||
that.submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
async submit() {
|
|
||||||
let that = this;
|
|
||||||
let res = null;
|
|
||||||
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
|
|
||||||
);
|
|
||||||
}
|
|
||||||
that.isSaving = false;
|
|
||||||
that.limitedVisible = false;
|
|
||||||
that.$refs.table.refresh();
|
|
||||||
} catch (e) {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mroomDel(row) {
|
|
||||||
var id = row.id;
|
|
||||||
var res = await this.$API.ofm.mroom.delete.req(id);
|
|
||||||
if (res.err_msg) {
|
|
||||||
this.$message.error(res.err_msg);
|
|
||||||
} else {
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
this.$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;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
|
||||||
margin-left: 0; /* 靠左 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue