|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
<el-tabs v-model="tabValue" type="card" @tab-click="handleTabClick">
|
|
<el-tabs v-model="tabValue" type="card" @tab-click="handleTabClick">
|
|
|
- <el-tab-pane label="稿纸信息" name="1">
|
|
|
|
|
|
|
+ <el-tab-pane v-if="query.type != 'view'" label="稿纸信息" name="1">
|
|
|
<MainBodyTemplate ref="mainBodyTemplate" :type="routerQuery.type" menu="notice" :disabled="disabled" @sendFiles="getFiles"></MainBodyTemplate>
|
|
<MainBodyTemplate ref="mainBodyTemplate" :type="routerQuery.type" menu="notice" :disabled="disabled" @sendFiles="getFiles"></MainBodyTemplate>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="正文" name="2">
|
|
<el-tab-pane label="正文" name="2">
|
|
@@ -27,7 +27,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</div>
|
|
</div>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane v-if="formData?.processInstanceId && !isApprove" label="流程详情" name="4">
|
|
|
|
|
|
|
+ <el-tab-pane v-if="formData?.processInstanceId && !isApprove && query.type != 'view'" label="流程详情" name="4">
|
|
|
<bpmDetail
|
|
<bpmDetail
|
|
|
v-if="formData.processInstanceId"
|
|
v-if="formData.processInstanceId"
|
|
|
:id="formData.processInstanceId"
|
|
:id="formData.processInstanceId"
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
// this.routerQuery = this.isApprove ? this.query : this.$route.query;
|
|
// this.routerQuery = this.isApprove ? this.query : this.$route.query;
|
|
|
this.routerQuery = this.query;
|
|
this.routerQuery = this.query;
|
|
|
- this.tabValue = '1';
|
|
|
|
|
|
|
+ this.tabValue = this.query.type == 'view' ? '3' : '1';
|
|
|
console.log('this.query~~~', this.query);
|
|
console.log('this.query~~~', this.query);
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.getDetail();
|
|
this.getDetail();
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
disabled() {
|
|
disabled() {
|
|
|
- return this.routerQuery.type == 'detail';
|
|
|
|
|
|
|
+ return this.routerQuery.type == 'detail' || this.routerQuery.type == 'view';
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -186,7 +186,9 @@ export default {
|
|
|
let ids =this.formData.fields.find((item) => item.fieldKey == 'attachments')?.defaultValue || '';
|
|
let ids =this.formData.fields.find((item) => item.fieldKey == 'attachments')?.defaultValue || '';
|
|
|
this.getFiles(ids);
|
|
this.getFiles(ids);
|
|
|
console.log(this.formData, this.$refs.mainBodyTemplate);
|
|
console.log(this.formData, this.$refs.mainBodyTemplate);
|
|
|
- this.$refs.mainBodyTemplate.setData(this.formData.fields);
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.mainBodyTemplate && this.$refs.mainBodyTemplate.setData(this.formData.fields);
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
async getTemplateDetail() {
|
|
async getTemplateDetail() {
|
|
|
let res = await docTplTemplateById(this.routerQuery.id);
|
|
let res = await docTplTemplateById(this.routerQuery.id);
|