8f1d4460
monkeyhouyi
实现专项行动详情查看
|
1
2
3
|
<template>
<div>
<div class="FormDialog" @click="openDialog">
|
78a96911
monkeyhouyi
反馈表单详情
|
4
|
<el-button type="text" :disabled="disabled" :loading="btnLoading"><slot></slot></el-button>
|
8f1d4460
monkeyhouyi
实现专项行动详情查看
|
5
6
7
8
9
10
11
12
13
14
15
|
</div>
<NCCForm v-if="dialogVisible" ref="NCCForm" @refreshDataList="refresh"/>
</div>
</template>
<script>
import NCCForm from '@/views/baseSpecialAction/dynamicModel/list/Form'
import request from "@/utils/request";
export default {
components: { NCCForm },
props: {
|
78a96911
monkeyhouyi
反馈表单详情
|
16
|
row: {
|
8f1d4460
monkeyhouyi
实现专项行动详情查看
|
17
18
19
20
21
22
23
|
type: Object,
default: {},
},
isDetail: {
type: Boolean,
default: true,
},
|
78a96911
monkeyhouyi
反馈表单详情
|
24
25
26
27
|
disabled: {
type: Boolean,
default: false,
},
|
8f1d4460
monkeyhouyi
实现专项行动详情查看
|
28
29
30
31
32
33
34
35
36
|
},
data() {
return {
dialogVisible: false,
btnLoading: false,
}
},
methods: {
openDialog() {
|
8f1d4460
monkeyhouyi
实现专项行动详情查看
|
37
|
let row = this.row;
|
78a96911
monkeyhouyi
反馈表单详情
|
38
|
if(this.disabled) return;
|
8f1d4460
monkeyhouyi
实现专项行动详情查看
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
this.btnLoading = true;
this.dialogVisible = true;
var Itemid = row.itemId || '';//数据id,没有的话就是新增 ,有的话就是修改
var modelId = row.formId;//关联的表单id
var taskId = row.id; // 当前专项行动id
var isPreview = false;//固定死,值不变
var useFormPermission = false;//固定死,值不变
var formData = [];
request({
url: '/visualdev/OnlineDev/'+modelId+'/Config',
method: "GET",
params:null
}).then(res => {
formData = JSON.parse(res.data.formData);
formData.disabled = this.isDetail || false;
let form = JSON.stringify(formData);
this.$refs.NCCForm.init(form, modelId, Itemid, isPreview, useFormPermission, taskId, this.isDetail)
this.btnLoading = false;
}).catch(() => this.btnLoading = false);
},
refresh() {
this.dialogVisible = false;
},
}
}
</script>
|