feat: ofm-seal bug fix
This commit is contained in:
parent
dae7fe36c4
commit
3af6cba243
|
|
@ -68,7 +68,7 @@
|
|||
</el-container>
|
||||
<el-drawer title="会议室预定" v-model="limitedVisible" :size="'80%'" destroy-on-close>
|
||||
<bookingDialog
|
||||
v-model="limitedVisible"
|
||||
v-if="limitedVisible"
|
||||
:mode="mode"
|
||||
:t_id="t_id"
|
||||
:bookingIitem="bookingIitem"
|
||||
|
|
@ -115,6 +115,8 @@ export default {
|
|||
//添加
|
||||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.t_id = null;
|
||||
this.bookingIitem = {};
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
|
|
|
|||
|
|
@ -7,13 +7,7 @@
|
|||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'seal.create'"
|
||||
>内用</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd_outer"
|
||||
v-auth="'seal.create'"
|
||||
>外借</el-button>
|
||||
>新增</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
|
|
@ -87,34 +81,27 @@
|
|||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在节点" min-width="60">
|
||||
<el-table-column label="审批信息" width="200">
|
||||
<template #default="scope">
|
||||
{{scope.row.ticket_.state_.name}}
|
||||
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
|
||||
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
|
||||
</el-tag>
|
||||
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进行状态" min-width="60">
|
||||
<template #default="scope">
|
||||
{{statusOptions[scope.row.ticket_.state_.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="reason"
|
||||
min-width="60"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="sealEidt(scope.row)"
|
||||
v-auth="'seal.update'"
|
||||
@click="handleShow(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="sealDel(scope.row)"
|
||||
@confirm="handleDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
|
|
@ -132,7 +119,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer
|
||||
:title="drawerTitle[mode]"
|
||||
title="印章申请"
|
||||
v-model="limitedVisible"
|
||||
:destroy-on-close="true"
|
||||
direction="rtl"
|
||||
|
|
@ -142,8 +129,7 @@
|
|||
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
|
||||
<SealForm
|
||||
:mode="mode"
|
||||
v-model="addForm"
|
||||
:lending_type="lending_type"
|
||||
:t_id="t_id"
|
||||
@success="()=>{handleQuery(); limitedVisible = false}"
|
||||
@closed="limitedVisible = false"
|
||||
/>
|
||||
|
|
@ -152,153 +138,37 @@
|
|||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import SealForm from "./sealForm.vue";
|
||||
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
components: { SealForm},
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
actStateEnum, interveneTypeEnum,
|
||||
apiObj: this.$API.ofm.lendingseal.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
mode: "add",
|
||||
drawerTitle: {
|
||||
add: "新增印章使用",
|
||||
edit: "审批流",
|
||||
view: "查看印章使用",
|
||||
},
|
||||
statusOptions:{
|
||||
0: "审批中",
|
||||
1: "初始中",
|
||||
2: "已完成",
|
||||
},
|
||||
currentRow: null,
|
||||
//表单数据
|
||||
addForm: {
|
||||
seal: [],
|
||||
create_by_name: "",
|
||||
seal_other: "",
|
||||
filename: "",
|
||||
file: "",
|
||||
file_count: "",
|
||||
is_lending: false,
|
||||
contacts: "",
|
||||
lending_date: null,
|
||||
return_date: null,
|
||||
actual_return_date: null,
|
||||
reason: "",
|
||||
ticket_:null
|
||||
},
|
||||
mode: "show",
|
||||
t_id: null,
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket_!==null){
|
||||
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("seal").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.lending_type = "";
|
||||
this.t_id = null;
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleAdd_outer() {
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.mode = "add";
|
||||
handleShow(row) {
|
||||
this.mode = "show";
|
||||
this.t_id = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.lending_type = "outer";
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
|
||||
getDefaultForm(){
|
||||
return {
|
||||
seal: [],
|
||||
create_by_name: "",
|
||||
seal_other: "",
|
||||
filename: "",
|
||||
file: "",
|
||||
file_count: "",
|
||||
is_lending: false,
|
||||
contacts: "",
|
||||
lending_date: null,
|
||||
return_date: null,
|
||||
actual_return_date: null,
|
||||
reason: "",
|
||||
ticket_:null
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
sealEidt(row) {
|
||||
this.mode = "view";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
if (row.is_lending) {
|
||||
this.lending_type = "outer";
|
||||
} else {
|
||||
this.lending_type = "";
|
||||
}
|
||||
this.addForm = Object.assign({}, row);
|
||||
if (row.lending_date && row.return_date) {
|
||||
this.timeRange = [row.lending_date, row.return_date];
|
||||
} else {
|
||||
this.timeRange = [];
|
||||
}
|
||||
if (Array.isArray(row.seal)) {
|
||||
let knownSeals = ["公章", "法人章", "合同章", "财务章"];
|
||||
let otherItem = row.seal.filter((item) => !knownSeals.includes(item));
|
||||
this.addForm.seal = row.seal.filter((item) => knownSeals.includes(item));
|
||||
|
||||
if (otherItem.length > 0) {
|
||||
this.addForm.seal.push("其他");
|
||||
this.addForm.seal_other = otherItem.join(",");
|
||||
}else{
|
||||
this.addForm.seal_other = "";
|
||||
}
|
||||
} else {
|
||||
this.addForm.seal = [];
|
||||
}
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
async sealDel(row) {
|
||||
async handleDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.lendingseal.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
await this.$API.ofm.lendingseal.delete.req(id);
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
|
|
@ -308,54 +178,4 @@ export default {
|
|||
},
|
||||
};
|
||||
</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>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
<el-main>
|
||||
<el-form :model="localForm" label-width="100px" label-position="left" :rules="rules">
|
||||
<el-form-item label="文件名称" prop="filename">
|
||||
<el-input v-model="localForm.filename" clearable :disabled="localMode ==='view'"></el-input>
|
||||
<el-input v-model="localForm.filename" clearable :disabled="localMode ==='show'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="contacts">
|
||||
<el-input v-model="localForm.contacts" clearable :disabled="localMode ==='view'"></el-input>
|
||||
<el-input v-model="localForm.contacts" clearable :disabled="localMode ==='show'"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="印章类型">
|
||||
<el-checkbox-group v-model="localForm.seal" :disabled="localMode ==='view'">
|
||||
<el-checkbox-group v-model="localForm.seal" :disabled="localMode ==='show'">
|
||||
<el-checkbox label="公章"></el-checkbox>
|
||||
<el-checkbox label="法人章"></el-checkbox>
|
||||
<el-checkbox label="合同章"></el-checkbox>
|
||||
|
|
@ -18,16 +18,20 @@
|
|||
<el-checkbox label="其他"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-input
|
||||
v-if="localForm.seal.includes('其他')"
|
||||
v-if="localForm.seal && localForm.seal.includes('其他')"
|
||||
v-model="localForm.seal_other"
|
||||
placeholder = "请输入印章名称"
|
||||
size = "small"
|
||||
style="margin-top: 10;"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<template v-if="lending_type === 'outer'">
|
||||
<el-form-item label="借用日期">
|
||||
<el-date-picker
|
||||
</el-form-item>
|
||||
<el-form-item label="是否借出">
|
||||
<el-radio-group v-model="localForm.is_lending" :disabled="localMode ==='show'">
|
||||
<el-radio label="true">是</el-radio>
|
||||
<el-radio label="fasle">否</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<el-date-picker v-if="localForm.is_lending===true"
|
||||
v-model="timeRange"
|
||||
type="daterange"
|
||||
align="right"
|
||||
|
|
@ -36,11 +40,12 @@
|
|||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:disabled="localMode ==='view'"
|
||||
:disabled="localMode ==='show'"
|
||||
@change="handleDateChange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际归还日期" v-if="localForm.ticket_?.state_?.name=='借用中'">
|
||||
<el-form-item label="实际归还日期"
|
||||
v-if="['借用中', '结束'].includes(localForm.ticket_?.state_?.name)">
|
||||
<el-date-picker
|
||||
v-model="localForm.actual_return_date"
|
||||
type="date"
|
||||
|
|
@ -48,6 +53,7 @@
|
|||
value-format="YYYY-MM-DD"
|
||||
unlink-panels
|
||||
placeholder="选择日期"
|
||||
:disabled="localForm.ticket_?.state_?.name !== '借用中'"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
|
@ -57,10 +63,10 @@
|
|||
placeholder="请输入借用理由"
|
||||
v-model="localForm.reason"
|
||||
rows = '3'
|
||||
:disabled="localMode ==='view'">
|
||||
:disabled="localMode ==='show'">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
|
||||
<el-form-item label="文件内容">
|
||||
<sc-upload-file
|
||||
|
|
@ -69,7 +75,7 @@
|
|||
:limit="1"
|
||||
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
|
||||
@success = "fileUPSuccess"
|
||||
:disabled="localMode ==='view'"
|
||||
:disabled="localMode ==='show'"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
||||
</sc-upload-file>
|
||||
|
|
@ -80,17 +86,16 @@
|
|||
:min="0"
|
||||
:step="1"
|
||||
controls-position="right"
|
||||
:disabled="localMode ==='view'"></el-input-number>
|
||||
:disabled="localMode ==='show'"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="localMode!=='show'">
|
||||
<el-footer>
|
||||
<ticketd_b
|
||||
v-if="ticketview"
|
||||
:workflow_key="'seal'"
|
||||
:title="ticketTitle"
|
||||
:t_id="localForm.id"
|
||||
:ticket_="localForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
:ticket_="localForm.ticket_"
|
||||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
|
|
@ -99,11 +104,10 @@
|
|||
</el-main>
|
||||
<el-aside v-if="localForm.ticket_">
|
||||
<ticketd
|
||||
:ticket_="localForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success')"
|
||||
style="margin-top: 20px;"
|
||||
/>
|
||||
:ticket_="localForm.ticket_"
|
||||
@success="$emit('success')"
|
||||
style="margin-top: 20px;"
|
||||
></ticketd>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
</template>
|
||||
|
|
@ -113,64 +117,44 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
|
|||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
mode: { type: String, default: "view" }, // add / edit / view
|
||||
lending_type: { type: String, default: "outer" }, // inner / outer
|
||||
modelValue: { type: Object, default: () => ({}) },
|
||||
mode: {
|
||||
type: String, default: "show"
|
||||
}, // add / edit / show
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
type: String, default: null
|
||||
},
|
||||
},
|
||||
components: {ticketd, ticketd_b },
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
ticket_data: {},
|
||||
ticketview: false,
|
||||
ticketTitle: "用印申请",
|
||||
localForm: {
|
||||
ticket_: {
|
||||
state_: { type: '' }
|
||||
},
|
||||
...this.modelValue },
|
||||
localMode : this.mode,
|
||||
ticket_data: {},
|
||||
localForm: {},
|
||||
localMode: this.mode,
|
||||
timeRange: [],
|
||||
rules: {
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// console.log('--------this.t_id----------',this.t_id)
|
||||
this.getTid();
|
||||
this.initTimeRange();
|
||||
if (this.localForm.ticket_?.state_.type===1){
|
||||
this.localMode = 'edit'
|
||||
}
|
||||
if(this.lending_type === 'outer'){
|
||||
this.ticket_data = {
|
||||
is_lending: true
|
||||
};
|
||||
mounted() {
|
||||
let that = this;
|
||||
if (that.t_id) {
|
||||
that.getTid();
|
||||
}else {
|
||||
if(that.lending_type == 'outer'){
|
||||
that.localForm.is_lending = true;
|
||||
}else{
|
||||
this.ticket_data={is_lending: false}
|
||||
};
|
||||
that.localForm.is_lending = false;
|
||||
}
|
||||
}
|
||||
that.initTimeRange();
|
||||
},
|
||||
watch: {
|
||||
'localForm.actual_return_date'(val) {
|
||||
this.ticket_data.actual_return_date = val
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
addForm: {
|
||||
get() {
|
||||
return this.modelValue;
|
||||
},
|
||||
set(val) {
|
||||
this.$emit("update:modelValue", val);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleDateChange(val) {
|
||||
this.localForm.lending_date = val?.[0] || null
|
||||
|
|
@ -181,7 +165,6 @@ export default {
|
|||
this.ticketTitle = `${this.localForm.filename}-用印申请`
|
||||
if(that.localMode == "add") {
|
||||
let res = await that.$API.ofm.lendingseal.create.req(that.localForm);
|
||||
|
||||
that.localForm.id = res.id;
|
||||
} else if (that.localMode == "edit") {
|
||||
await that.$API.ofm.lendingseal.update.req(that.localForm.id, that.localForm);
|
||||
|
|
@ -189,18 +172,15 @@ export default {
|
|||
},
|
||||
getTid (){
|
||||
var that = this;
|
||||
// console.log('----------that--------',that.t_id)
|
||||
if (that.t_id) {
|
||||
that.$API.ofm.lendingseal.item.req(that.t_id).then(res=>{
|
||||
that.localForm = res;
|
||||
// console.log('----------ticket_--------',that.localForm.ticket_)
|
||||
that.ticketview = true;
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.localMode = "edit";
|
||||
}else{
|
||||
that.localMode = "show";
|
||||
}
|
||||
})
|
||||
if (that.t_id) {
|
||||
that.$API.ofm.lendingseal.item.req(that.t_id).then(res=>{
|
||||
that.localForm = res;
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.localMode = "edit";
|
||||
}else{
|
||||
that.localMode = "show";
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
initTimeRange() {
|
||||
|
|
|
|||
|
|
@ -80,16 +80,15 @@
|
|||
prop="actual_km"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column label="所在节点" min-width="60">
|
||||
<el-table-column label="审批信息" width="200">
|
||||
<template #default="scope">
|
||||
{{scope.row.ticket_.state_.name}}
|
||||
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
|
||||
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
|
||||
</el-tag>
|
||||
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在节点" min-width="60">
|
||||
<template #default="scope">
|
||||
{{statusOptions[scope.row.ticket_.state_.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
|
|
@ -120,7 +119,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer
|
||||
:title="drawerTitle[type]"
|
||||
:title="车辆审批"
|
||||
v-model="limitedVisible"
|
||||
:destroy-on-close="true"
|
||||
direction="rtl"
|
||||
|
|
@ -129,19 +128,19 @@
|
|||
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
|
||||
<VehicleForm
|
||||
:mode="type"
|
||||
v-model="addForm"
|
||||
:lending_type="lending_type"
|
||||
:transitions="transitions"
|
||||
:formData="currentRow"
|
||||
:t_id="t_id"
|
||||
@success="()=>{handleQuery(); limitedVisible = false}"
|
||||
@closed="limitedVisible = false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import VehicleForm from "./vehicleForm.vue";
|
||||
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
components: {
|
||||
VehicleForm
|
||||
|
|
@ -149,31 +148,14 @@ export default {
|
|||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
actStateEnum, interveneTypeEnum,
|
||||
apiObj: this.$API.ofm.vehicle.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
transitions:[],
|
||||
drawerTitle: {
|
||||
add: "新增车辆使用",
|
||||
edit: "编辑车辆使用",
|
||||
view: "查看车辆使用",
|
||||
},
|
||||
statusOptions:{
|
||||
0: "审批中",
|
||||
1: "初始中",
|
||||
2: "已完成",
|
||||
},
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
choiceOption: [],
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
t_id: null,
|
||||
//表单数据
|
||||
addForm: {
|
||||
start_time: null,
|
||||
|
|
@ -189,49 +171,17 @@ export default {
|
|||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket_!==null){
|
||||
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("vehicle").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
getDefaultForm(){
|
||||
return {
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
location: null,
|
||||
via: null,
|
||||
destination: null,
|
||||
start_km: null,
|
||||
end_km: null,
|
||||
is_city: true,
|
||||
reason: null,
|
||||
ticket_:null
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
vehicleEidt(row) {
|
||||
this.type = "view";
|
||||
this.editId = row.id;
|
||||
this.type = "show";
|
||||
this.currentRow = row;
|
||||
this.t_id = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
// 更新审批流
|
||||
saveVehicle() {
|
||||
|
|
@ -250,68 +200,15 @@ export default {
|
|||
async vehicleDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.vehicle.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
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>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,10 +62,11 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<el-footer>
|
||||
<ticketd_b
|
||||
v-if="ticketed_show"
|
||||
:workflow_key="'vehicle'"
|
||||
:title="ticketTitle"
|
||||
:title="用车审批"
|
||||
:t_id="addForm.id"
|
||||
:ticket_="addForm.ticket_"
|
||||
:submit_b_func="submit_b_func"
|
||||
|
|
@ -78,6 +79,7 @@
|
|||
</el-main>
|
||||
<el-aside v-if="addForm.ticket_">
|
||||
<ticketd
|
||||
v-if="ticketed_show"
|
||||
:ticket_="addForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success')"
|
||||
|
|
@ -92,9 +94,12 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
|
|||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
mode: { type: String, default: "view" }, // add / edit / view
|
||||
modelValue: { type: Object, default: () => ({}) },
|
||||
transitions: { type: Array, default: () => [] },
|
||||
mode: {
|
||||
type: String, default: "view"
|
||||
}, // add / edit / view
|
||||
formData: {
|
||||
type: Object, default: () => ({})
|
||||
},
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
|
|
@ -108,27 +113,30 @@ export default {
|
|||
ticket_: {
|
||||
state_: { type: '' }
|
||||
},
|
||||
...this.modelValue },
|
||||
|
||||
ticketTitle: "用车申请",
|
||||
ticket_data: {},
|
||||
localMode : this.mode,
|
||||
rules:{
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
workflow_key: "vehicle_in",
|
||||
vehicle_scope:[{name: '市内', is_city: true},{name: '市外', is_city: false}],
|
||||
}
|
||||
...this.modelValue
|
||||
},
|
||||
ticketed_show: false,
|
||||
ticketTitle: "用车申请",
|
||||
ticket_data: {},
|
||||
localMode : this.mode,
|
||||
rules:{
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
workflow_key: "vehicle_in",
|
||||
vehicle_scope:[{name: '市内', is_city: true},{name: '市外', is_city: false}],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.addForm.ticket_?.state_.type===1){
|
||||
this.localMode = 'edit'
|
||||
let that = this;
|
||||
that.addForm = that.formData;
|
||||
// if (that.addForm.ticket_?.state_.type===1){
|
||||
// that.localMode = 'edit'
|
||||
// };
|
||||
that.ticket_data = {
|
||||
...that.ticket_data,
|
||||
is_city: that.addForm.is_city,
|
||||
};
|
||||
this.ticket_data = {
|
||||
...this.ticket_data,
|
||||
is_city: this.addForm.is_city,
|
||||
};
|
||||
this.getTid();
|
||||
that.getTid();
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -157,7 +165,6 @@ export default {
|
|||
deep: true,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,289 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel-group">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'PaperSe.create'"
|
||||
>新增</el-button>
|
||||
</div>
|
||||
<!-- <div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.paper_name"
|
||||
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="p_date"
|
||||
min-width="60"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="归口部门"
|
||||
prop="p_dept"
|
||||
min-width="60"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="建设期"
|
||||
prop="const"
|
||||
min-width="60"
|
||||
></el-table-column>
|
||||
<el-table-column label="市级平台" prop="city_p" mim-width="60">
|
||||
<template #default="scope">
|
||||
<span :style="{color: scope.row.city_p ? '#67C23A' : '#F56C6C'}">
|
||||
{{ scope.row.city_p ? '是' : '否'}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="省级平台" prop="province_p" mim-width="60">
|
||||
<template #default="scope">
|
||||
<span :style="{color: scope.row.province_p ? '#67C23A' : '#F56C6C'}">
|
||||
{{ scope.row.province_p ? '是' : '否'}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="负责人"
|
||||
prop="charge"
|
||||
min-width="60"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="平台基本情况与目标绩效"
|
||||
prop="condition"
|
||||
min-width="60"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="paperseEdit(scope.row)"
|
||||
v-auth="'PaperSe.update'"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="papersetDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'PaperSe.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer
|
||||
:title="drawerTitle[mode]"
|
||||
v-model="limitedVisible"
|
||||
:destroy-on-close="true"
|
||||
direction="rtl"
|
||||
size="70%"
|
||||
>
|
||||
<div style="display: flex; height: calc(100% - 60px);">
|
||||
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
|
||||
<PaperForm
|
||||
:mode="mode"
|
||||
v-model="addForm"
|
||||
:transitions="transitions"
|
||||
@success="()=>{handleQuery(); limitedVisible = false}"
|
||||
@closed="limitedVisible = false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import PaperForm from "./paperse_form.vue";
|
||||
export default {
|
||||
components: { PaperForm},
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.srm.papersecret.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
mode: "add",
|
||||
drawerTitle: {
|
||||
add: "新增论文申密",
|
||||
edit: "审批流",
|
||||
view: "查看论文申密",
|
||||
},
|
||||
statusOptions:{
|
||||
0: "审批中",
|
||||
1: "初始中",
|
||||
2: "已完成",
|
||||
},
|
||||
currentRow: null,
|
||||
//表单数据
|
||||
addForm: {
|
||||
paper_name: "",
|
||||
publication_name:"",
|
||||
author: "",
|
||||
paper_type: "",
|
||||
is_chinese_core: false,
|
||||
is_sci: false,
|
||||
tech_status: [],
|
||||
tech_file: [],
|
||||
ticket_:null
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket_!==null){
|
||||
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("paperse").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.lending_type = "";
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
|
||||
getDefaultForm(){
|
||||
return {
|
||||
paper_name: "",
|
||||
publication_name:"",
|
||||
author: "",
|
||||
paper_type: "",
|
||||
is_chinese_core: false,
|
||||
is_sci: false,
|
||||
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
|
||||
{ name: "是否发表过文章", status: "", fileList: [] },
|
||||
{ name: "是否参与过展会展出", status: "", fileList: [] },
|
||||
{ name: "是否应用于生产/销售", status: "", fileList: [] },
|
||||
{ name: "是否参与过技术交流", status: "", fileList: [] }],
|
||||
tech_file: [ { name: "论文内容", status: "", pages: "" },
|
||||
{ name: "图或者照片", pages: "" }],
|
||||
ticket_:null
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
paperseEdit(row) {
|
||||
this.mode = "view";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
async papersetDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.srm.papersecret.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>
|
||||
|
||||
|
|
@ -0,0 +1,204 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-form :model="localForm" label-width="150px" label-position="left" :rules="rules">
|
||||
<el-form-item label="拟发表论文名称" prop="paper_name">
|
||||
<el-input v-model="localForm.paper_name" clearable :disabled="localMode ==='view'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟投期刊名称" prop="publication_name">
|
||||
<el-input v-model="localForm.publication_name" clearable :disabled="localMode ==='view'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="作者" prop="author" >
|
||||
<el-input v-model="localForm.author" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟发表文章类型" prop="paper_type">
|
||||
<el-select v-model="localForm.paper_type" placeholder="请选择拟发表文章类型" :disabled="localMode ==='view'">
|
||||
<el-option label="研究论文" value="研究论文"></el-option>
|
||||
<el-option label="综述" value="综述"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为中文核心" prop="is_chinese_core">
|
||||
<el-radio-group v-model="localForm.is_chinese_core" :disabled="localMode ==='view'">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否被SCI/EI收录" prop="is_sci">
|
||||
<el-radio-group v-model="localForm.is_sci" :disabled="localMode ==='view'">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="技术状态" prop="tech_status">
|
||||
<el-row>
|
||||
<el-col :span="12" v-for="(item, index) in localForm.tech_status || []" :key="index">
|
||||
<div class="class-row">
|
||||
<span>{{ item.name }}</span>
|
||||
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='view'">
|
||||
<el-radio label="是">是</el-radio>
|
||||
<el-radio label="否">否</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div v-if="item.status === '是'" class="upload-section">
|
||||
<sc-upload-file
|
||||
multiple
|
||||
:limit="3"
|
||||
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
|
||||
@success = "(res)=>fileUPSuccess(res, item)"
|
||||
:disabled="localMode ==='view'"
|
||||
>
|
||||
<el-button type="primary" size="small" icon="el-icon-upload"> </el-button>
|
||||
</sc-upload-file>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="技术文件" prop="tech_file">
|
||||
<div class="file-item" v-for="(item, index) in localForm.tech_file || []" :key="index">
|
||||
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='view'">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
<el-input
|
||||
class="page-input"
|
||||
v-model="item.pages"
|
||||
placeholder="页/张数"
|
||||
:disabled="!item.checked || localMode ==='view'"
|
||||
type="number"
|
||||
min="0">
|
||||
<template v-slot:append>页/张</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="localMode!=='show'">
|
||||
<ticketd_b
|
||||
:workflow_key="'paperse'"
|
||||
:title="ticketTitle"
|
||||
:t_id="localForm.id"
|
||||
:ticket_="localForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
@colsed="$emit('closed')"
|
||||
/>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside v-if="localForm.ticket_">
|
||||
<ticketd
|
||||
:ticket_="localForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success')"
|
||||
style="margin-top: 20px;"
|
||||
/>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
mode: { type: String, default: "view" }, // add / edit / view
|
||||
modelValue: { type: Object, default: () => ({}) },
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
components: {ticketd, ticketd_b},
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
ticket_data: {},
|
||||
ticketTitle: "论文申密申请",
|
||||
localMode : this.mode,
|
||||
rules: {
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
localForm: {
|
||||
ticket_: { state_: { type: '' } },
|
||||
...(this.modelValue || {}) }
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('mode', this.localMode)
|
||||
},
|
||||
watch: {
|
||||
localForm: {
|
||||
handler(val) {
|
||||
Object.assign(this.ticket_data, {
|
||||
author: val.author,
|
||||
// 其他需要同步的字段...
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
if(that.localForm?.id){
|
||||
that.localMode = "edit";
|
||||
}
|
||||
if(that.localMode == "add") {
|
||||
let res = await that.$API.srm.papersecret.create.req(that.localForm);
|
||||
|
||||
that.localForm.id = res.id;
|
||||
} else if (that.localMode == "edit") {
|
||||
await that.$API.srm.papersecret.update.req(that.localForm.id, that.localForm);
|
||||
}
|
||||
},
|
||||
getTid (){
|
||||
var that = this;
|
||||
if (that.t_id) {
|
||||
that.$API.srm.papersecret.item.req(that.t_id).then(res=>{
|
||||
that.localForm = res;
|
||||
if(res.ticket_?.state_?.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.localMode = "edit";
|
||||
}else{
|
||||
that.localMode = "show";
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fileUPSuccess(res, item) {
|
||||
if(!item.fileList) {
|
||||
item.fileList = []
|
||||
}
|
||||
item.fileList.push(res.path)
|
||||
item.file = res.path
|
||||
},
|
||||
handleCheckChange(item) {
|
||||
// 如果取消勾选,清空页数
|
||||
if (!item.checked) {
|
||||
item.pages = '';
|
||||
}
|
||||
},
|
||||
// 当选择“否”时清空文件
|
||||
handleStatusChange(item) {
|
||||
if (item.status === "否") {
|
||||
item.file = "";
|
||||
item.fileList = [];
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.status-item {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.status-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.upload-section {
|
||||
margin-left: 10px;
|
||||
border-left: 2px solid #eee;
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue