|
@@ -53,6 +53,13 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="againUpdate(scope.row)"
|
|
|
>重新授权
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -90,11 +97,11 @@
|
|
|
|
|
|
<!-- 添加或修改项目授权管理对话框 -->
|
|
|
<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 ref="form" :model="form" :rules="rules" label-width="140px">
|
|
|
<el-form-item label="项目名称" prop="projectName">
|
|
|
<el-select v-model="form.projectName" filterable placeholder="请选择项目名称" @change="onChange">
|
|
|
<el-option
|
|
|
- v-for="item in options"
|
|
|
+ v-for="item in projectData"
|
|
|
:key="item.id"
|
|
|
:label="item.projectName"
|
|
|
:value="item.id">
|
|
@@ -109,6 +116,16 @@
|
|
|
value-format="yyyy-MM-dd">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="授权认证类型" prop="authorityType">
|
|
|
+ <el-select v-model="form.authorityType" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -173,7 +190,7 @@ export default {
|
|
|
projectName: null,
|
|
|
secretKey: null
|
|
|
},
|
|
|
- options: [],
|
|
|
+ projectData: [],
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
formDel: {
|
|
@@ -182,6 +199,13 @@ export default {
|
|
|
value: true,
|
|
|
// 表单校验
|
|
|
rules: {},
|
|
|
+ options: [{
|
|
|
+ value: '1',
|
|
|
+ label: '在线授权'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '离线授权'
|
|
|
+ }],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -231,7 +255,7 @@ export default {
|
|
|
getProjectList() {
|
|
|
this.loading = true;
|
|
|
listAllProject().then(response => {
|
|
|
- this.options = response.data;
|
|
|
+ this.projectData = response.data;
|
|
|
});
|
|
|
},
|
|
|
// 取消按钮
|
|
@@ -244,7 +268,7 @@ export default {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
projectName: null,
|
|
|
- secretKey: null,
|
|
|
+ authorityType: null,
|
|
|
overdueDate: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
@@ -282,6 +306,16 @@ export default {
|
|
|
this.title = "修改项目授权管理";
|
|
|
});
|
|
|
},
|
|
|
+ //重新授权
|
|
|
+ againUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getSecret(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改项目授权管理";
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 复制按钮操作 */
|
|
|
handleCopy(row) {
|
|
|
const secretKey = row.secretKey;
|
|
@@ -295,7 +329,7 @@ export default {
|
|
|
},
|
|
|
onChange(e) {
|
|
|
this.form.projectId = e
|
|
|
- this.form.projectName = this.options.find(item => item.id == e).projectName
|
|
|
+ this.form.projectName = this.projectData.find(item => item.id == e).projectName
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|