liuyg
2021-08-14 0519d875ecdd5f3b1bb143acd7f8de5a2d32371e
src/views/permit/permit.vue
@@ -47,6 +47,7 @@
            :size="size"
            :type="type"
            @click.stop="rowDel(row)"
            v-if="row.type == '2'"
            >许可审批
          </el-button>
          <el-button
@@ -125,6 +126,19 @@
        <el-button type="primary" @click="Print">打 印</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title=""
      :visible.sync="dialogVisiblecc"
      width="30%"
      :modal-append-to-body="false"
    >
      <span>是否通过审核?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closecc">通过</el-button>
        <el-button type="primary" @click="subcc">不通过</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -135,6 +149,9 @@
export default {
  data() {
    return {
      dialogVisiblecc: false, //许可证审核抽屉
      xukezData: {},
      dialogVisible: false, //许可证抽屉
      licenceData: {
        row: {},
@@ -481,33 +498,20 @@
      );
    },
    rowDel(row) {
      this.$confirm("是否通过?", {
        confirmButtonText: "通过",
        cancelButtonText: "不通过",
        type: "warning",
      })
        .then(() => {
          row.type = "0";
          return update(row);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        })
        .catch(() => {
          row.type = "1";
          return update(row);
          // update(row);
          // this.onLoad(this.page);
          // this.$message({
          //   type: "warning",
          //   message: "操作成功!",
          // });
        });
      this.dialogVisiblecc = true;
      this.xukezData = row;
    },
    closecc() {
      this.xukezData.type = "0";
      this.dialogVisiblecc = false;
      return update(this.xukezData);
    },
    subcc() {
      this.xukezData.type = "1";
      this.dialogVisiblecc = false;
      return update(this.xukezData);
    },
    viewLicense(row) {
      //查看许可证
      this.licenceData.row = row;