You need to sign in before continuing.

Commit 78a96911a5cf0e46e11c097c7e887ce8eb745ea9

Authored by monkeyhouyi
1 parent 3d5231d9

反馈表单详情

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