|
@@ -40,7 +40,7 @@
|
|
|
<el-table-column align="center" label="操作" width="150px" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button :disabled="scope.row.status == 0?false:true" type="primary" size="small" @click="handleComplete(scope.row.id,0)">通过</el-button>
|
|
|
- <el-button :disabled="scope.row.status == 0?false:true" type="warning" size="small" @click="handleComplete(scope.row.id,1)">不通过</el-button>
|
|
|
+ <el-button :disabled="scope.row.status == 0?false:true" type="warning" size="small" @click="handleCreate(scope.row.id)">不通过</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -52,6 +52,18 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
+ <!-- 添加或修改对话框 -->
|
|
|
+ <el-dialog :close-on-click-modal="false" title="证书审批" :visible.sync="dialogFormVisible" width="40%">
|
|
|
+ <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
|
|
|
+ <el-form-item label="审批内容" prop="content">
|
|
|
+ <el-input type="textarea" :rows="2" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleComplete(certificateId,1)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -73,7 +85,6 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- types,
|
|
|
complete,
|
|
|
list,
|
|
|
} from "@/api/certManage";
|
|
@@ -85,9 +96,14 @@
|
|
|
directives: { waves },
|
|
|
data() {
|
|
|
return {
|
|
|
- typeVisible: false,
|
|
|
- fileImgUrl: this.upLoadUrl,
|
|
|
- recipientsList: [],
|
|
|
+ certificateId:'',
|
|
|
+ dialogFormVisible: false,
|
|
|
+ dataForm: {
|
|
|
+ content: ''
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ content: [{ required: true, message: "审批内容不能为空", trigger: "blur" }],
|
|
|
+ },
|
|
|
statusTypeList: [
|
|
|
{
|
|
|
type: 0,
|
|
@@ -102,42 +118,15 @@
|
|
|
name: "不通过",
|
|
|
},
|
|
|
],
|
|
|
- subTypeList: [
|
|
|
- {
|
|
|
- type: 0,
|
|
|
- name: "奖状",
|
|
|
- },
|
|
|
- {
|
|
|
- type: 1,
|
|
|
- name: "邮件",
|
|
|
- },
|
|
|
- ],
|
|
|
list: [
|
|
|
],
|
|
|
- delarr: [],
|
|
|
- multipleSelection: [],
|
|
|
total: 0,
|
|
|
listLoading: false,
|
|
|
listQuery: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
- // type: "",
|
|
|
status: "",
|
|
|
},
|
|
|
- dataForm: {
|
|
|
- type: undefined,
|
|
|
- flag:'',
|
|
|
- certificateId:'',
|
|
|
- },
|
|
|
- dialogFormVisible: false,
|
|
|
- dialogStatus: "",
|
|
|
- textMap: {
|
|
|
- update: "证书审核",
|
|
|
- create: "创建",
|
|
|
- },
|
|
|
- rules: {
|
|
|
- type: [{ required: true, message: "请选择证书类型", trigger: "blur" }],
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -173,19 +162,32 @@
|
|
|
this.listQuery.page = val;
|
|
|
this.getList();
|
|
|
},
|
|
|
-
|
|
|
- handleView(row) {
|
|
|
- this.dataForm.type = '';
|
|
|
- this.dataForm.certificateId =row.id;
|
|
|
- this.dialogStatus = "update";
|
|
|
+ handleCreate(id) {
|
|
|
this.dialogFormVisible = true;
|
|
|
+ this.certificateId = id;
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs["dataForm"].clearValidate();
|
|
|
+ this.dataForm.content = '';
|
|
|
+ this.$refs["dataForm"].clearValidate();
|
|
|
});
|
|
|
},
|
|
|
handleComplete(certificateId,flag){
|
|
|
- complete({certificateId:certificateId,flag:flag}).then(() => {
|
|
|
- this.dialogFormVisible = false;
|
|
|
+ if(flag==1){
|
|
|
+ this.$refs["dataForm"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ complete({certificateId:certificateId,flag:flag,content:this.dataForm.content}).then(() => {
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ this.$notify({
|
|
|
+ title: "成功",
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ complete({certificateId:certificateId,flag:flag}).then(() => {
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "操作成功",
|
|
@@ -194,7 +196,7 @@
|
|
|
});
|
|
|
this.getList();
|
|
|
});
|
|
|
-
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|