|
@@ -36,38 +36,6 @@
|
|
|
>新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- >修改
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="warning"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-download"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- @click="handleExport"-->
|
|
|
-<!-- >导出-->
|
|
|
-<!-- </el-button>-->
|
|
|
- </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
@@ -75,6 +43,8 @@
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column label="序号" align="center" type="index"/>
|
|
|
<el-table-column label="项目名称" align="center" prop="projectName"/>
|
|
|
+ <el-table-column label="状态" align="center" prop="statusText"/>
|
|
|
+ <el-table-column label="过期时间" align="center" property="date" prop="overdueDate"/>
|
|
|
<el-table-column label="标识码" align="center" prop="secretKey"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
@@ -83,7 +53,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- >修改
|
|
|
+ >重新授权
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -111,7 +81,7 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
- <!-- 添加或修改【请填写功能名称】对话框 -->
|
|
|
+ <!-- 添加或修改项目授权管理对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="项目名称" prop="projectName">
|
|
@@ -124,8 +94,13 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="标识码" prop="secretKey">
|
|
|
- <el-input v-model="form.secretKey" placeholder="请输入标识码"/>
|
|
|
+ <el-form-item label="过期时间" prop="overdueDate">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.overdueDate"
|
|
|
+ placeholder="请选择过期时间"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -133,15 +108,27 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 删除项目授权管理对话框 -->
|
|
|
+ <el-dialog title="系统提示" :visible.sync="openDel" width="500px" append-to-body>
|
|
|
+ <el-form ref="form" :model="formDel" :rules="rulesDel" label-width="120px">
|
|
|
+ <el-form-item label="请输入确认删除" prop="inputConfirm">
|
|
|
+ <el-input v-model="formDel.inputConfirm" placeholder="确认删除"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitFormDel">确 定</el-button>
|
|
|
+ <el-button @click="cancelDel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {listSecret, getSecret, delSecret, addSecret, updateSecret,copySecret} from "@/api/system/secret";
|
|
|
+import {listSecret, getSecret, delSecret, addSecret, updateSecret, copySecret} from "@/api/system/secret";
|
|
|
import {listAllProject} from "@/api/system/project";
|
|
|
|
|
|
export default {
|
|
|
- name: "Project",
|
|
|
+ name: "secret",
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
@@ -156,12 +143,13 @@ export default {
|
|
|
showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
- // 【请填写功能名称】表格数据
|
|
|
+ // 项目授权管理表格数据
|
|
|
secretList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ openDel: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -172,8 +160,20 @@ export default {
|
|
|
options: [],
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ formDel: {
|
|
|
+ inputConfirm: ''
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
- rules: {}
|
|
|
+ rules: {
|
|
|
+ // overdueDate: [
|
|
|
+ // {required: true, message: '请选择过期时间', trigger: 'change'}
|
|
|
+ // ],
|
|
|
+ },
|
|
|
+ rulesDel: {
|
|
|
+ inputConfirm: [
|
|
|
+ {required: true, message: '请输入名称', trigger: 'input'}
|
|
|
+ ],
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
this.getProjectList()
|
|
|
},
|
|
|
methods: {
|
|
|
- /** 查询【请填写功能名称】列表 */
|
|
|
+ /** 查询项目授权管理列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listSecret(this.queryParams).then(response => {
|
|
@@ -207,7 +207,8 @@ export default {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
projectName: null,
|
|
|
- secretKey: null
|
|
|
+ secretKey: null,
|
|
|
+ overdueDate: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -232,7 +233,7 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = "添加【请填写功能名称】";
|
|
|
+ this.title = "添加项目授权管理";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -241,13 +242,12 @@ export default {
|
|
|
getSecret(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
- this.title = "修改【请填写功能名称】";
|
|
|
+ this.title = "修改项目授权管理";
|
|
|
});
|
|
|
},
|
|
|
/** 复制按钮操作 */
|
|
|
handleCopy(row) {
|
|
|
const secretKey = row.secretKey;
|
|
|
-
|
|
|
navigator.clipboard.writeText(secretKey)
|
|
|
.then(() => {
|
|
|
this.$message.success("信息已复制");
|
|
@@ -283,22 +283,29 @@ export default {
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(function () {
|
|
|
- return delSecret(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.getProjectList();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {
|
|
|
- });
|
|
|
+ this.ids = row.id || this.ids;
|
|
|
+ this.formDel.inputConfirm = ''
|
|
|
+ this.openDel = true
|
|
|
+ },
|
|
|
+ submitFormDel() {
|
|
|
+ if (this.formDel.inputConfirm == '确认删除') {
|
|
|
+ delSecret(this.ids).then(() => {
|
|
|
+ this.ids = []
|
|
|
+ this.getList();
|
|
|
+ this.getProjectList();
|
|
|
+ this.formDel.inputConfirm = ''
|
|
|
+ this.openDel = false
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.warning("您输入的内容不正确,请重新输入!")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancelDel() {
|
|
|
+ this.formDel.inputConfirm = ''
|
|
|
+ this.openDel = false
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download('system/secret/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `project_${new Date().getTime()}.xlsx`)
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|