Commit 78a96911a5cf0e46e11c097c7e887ce8eb745ea9

Authored by monkeyhouyi
1 parent 3d5231d9

反馈表单详情

src/components/FormDialog/index.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 <div class="FormDialog" @click="openDialog"> 3 <div class="FormDialog" @click="openDialog">
4 - <el-button type="text" :disabled="row.state != '已填写'" :loading="btnLoading">详情</el-button> 4 + <el-button type="text" :disabled="disabled" :loading="btnLoading"><slot></slot></el-button>
5 </div> 5 </div>
6 <NCCForm v-if="dialogVisible" ref="NCCForm" @refreshDataList="refresh"/> 6 <NCCForm v-if="dialogVisible" ref="NCCForm" @refreshDataList="refresh"/>
7 </div> 7 </div>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 export default { 13 export default {
14 components: { NCCForm }, 14 components: { NCCForm },
15 props: { 15 props: {
16 - row: { 16 + row: {
17 type: Object, 17 type: Object,
18 default: {}, 18 default: {},
19 }, 19 },
@@ -21,6 +21,10 @@ @@ -21,6 +21,10 @@
21 type: Boolean, 21 type: Boolean,
22 default: true, 22 default: true,
23 }, 23 },
  24 + disabled: {
  25 + type: Boolean,
  26 + default: false,
  27 + },
24 }, 28 },
25 data() { 29 data() {
26 return { 30 return {
@@ -31,7 +35,7 @@ @@ -31,7 +35,7 @@
31 methods: { 35 methods: {
32 openDialog() { 36 openDialog() {
33 let row = this.row; 37 let row = this.row;
34 - if(this.row.state != '已填写') return; 38 + if(this.disabled) return;
35 this.btnLoading = true; 39 this.btnLoading = true;
36 this.dialogVisible = true; 40 this.dialogVisible = true;
37 var Itemid = row.itemId || '';//数据id,没有的话就是新增 ,有的话就是修改 41 var Itemid = row.itemId || '';//数据id,没有的话就是新增 ,有的话就是修改