Showing
10 changed files
with
445 additions
and
60 deletions
@@ -172,7 +172,12 @@ const routes = [{ | @@ -172,7 +172,12 @@ const routes = [{ | ||
172 | path: '/vue3/license', | 172 | path: '/vue3/license', |
173 | name: 'license', | 173 | name: 'license', |
174 | component: () => myImport('views/license/index') | 174 | component: () => myImport('views/license/index') |
175 | - } | 175 | + }, |
176 | + { | ||
177 | + path: '/vue3/thirdSet', | ||
178 | + name: 'thirdSet', | ||
179 | + component: () => myImport('views/thirdSet/index') | ||
180 | + }, | ||
176 | ]; | 181 | ]; |
177 | 182 | ||
178 | // hash模式: createWebHashHistory | 183 | // hash模式: createWebHashHistory |
@@ -23,11 +23,11 @@ | @@ -23,11 +23,11 @@ | ||
23 | <el-descriptions-item label="授权状态" label-align="right" align="center"> | 23 | <el-descriptions-item label="授权状态" label-align="right" align="center"> |
24 | {{tableData.authorizeStats}} | 24 | {{tableData.authorizeStats}} |
25 | </el-descriptions-item> | 25 | </el-descriptions-item> |
26 | - <el-descriptions-item label="授权时间" label-align="right" align="center"> | 26 | + <el-descriptions-item label="导入时间" label-align="right" align="center"> |
27 | {{tableData.authorizeTime}} | 27 | {{tableData.authorizeTime}} |
28 | </el-descriptions-item> | 28 | </el-descriptions-item> |
29 | <el-descriptions-item label="剩余" label-align="right" align="center"> | 29 | <el-descriptions-item label="剩余" label-align="right" align="center"> |
30 | - <el-tag size="small">{{tableData.timeLeft}}天</el-tag> | 30 | + <el-tag size="small" v-if="tableData.timeLeft">{{tableData.timeLeft}}天</el-tag> |
31 | </el-descriptions-item> | 31 | </el-descriptions-item> |
32 | </el-descriptions> | 32 | </el-descriptions> |
33 | </el-col> | 33 | </el-col> |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | </div> | 30 | </div> |
31 | <div v-if="prop == 'img'"> | 31 | <div v-if="prop == 'img'"> |
32 | <div v-if="row.type == 'img'"> | 32 | <div v-if="row.type == 'img'"> |
33 | - <el-image style="width: 100px; height: 100px" :src="domainName+row.code" /> | 33 | + <el-image style="width: 60px; height: 60px;border-radius: 10px;" :src="domainName+row.code" /> |
34 | </div> | 34 | </div> |
35 | </div> | 35 | </div> |
36 | </template> | 36 | </template> |
@@ -54,37 +54,42 @@ | @@ -54,37 +54,42 @@ | ||
54 | 54 | ||
55 | <!--新增编辑弹框--> | 55 | <!--新增编辑弹框--> |
56 | <cm-dialog :showDialogVisible="cacheVisible" :showFooter="false" :title="titleName" @hidedialog="cancelBtn" | 56 | <cm-dialog :showDialogVisible="cacheVisible" :showFooter="false" :title="titleName" @hidedialog="cancelBtn" |
57 | - width="400px"> | 57 | + width="500px"> |
58 | <template v-slot> | 58 | <template v-slot> |
59 | - <el-form | ||
60 | - :model="fileFrom" | ||
61 | - :rules="docRulesForm" | ||
62 | - label-position="right" | ||
63 | - label-width="100px" | ||
64 | - label-width="120px" | ||
65 | - ref="ruleForm"> | ||
66 | - <el-form-item label="名称" prop="name"> | ||
67 | - <el-input :size="$global.elementConfig.size.input" clearable v-model="fileFrom.name"></el-input> | ||
68 | - </el-form-item> | ||
69 | - <el-form-item label="编码" prop="code"> | ||
70 | - <el-input :size="$global.elementConfig.size.input" clearable v-model="fileFrom.code"></el-input> | ||
71 | - </el-form-item> | ||
72 | - <el-form-item label="文件" prop="img"> | ||
73 | - <el-upload | ||
74 | - :auto-upload="true" | ||
75 | - :before-upload="beforeAvatarUpload" | ||
76 | - :http-request="getFile" | ||
77 | - :multiple="false" | ||
78 | - :show-file-list="false"> | ||
79 | - <el-input :size="$global.elementConfig.size.input" placeholder="请上传文件" v-model="fileFrom.fileName" class="upload-demo-systemConf"></el-input> | ||
80 | - </el-upload> | ||
81 | - </el-form-item> | ||
82 | - <el-form-item> | ||
83 | - <el-button :size="$global.elementConfig.size.button" @click="addFrom()" type="primary">保存 | ||
84 | - </el-button> | ||
85 | - <el-button :size="$global.elementConfig.size.button" @click="cancelBtn">取消</el-button> | ||
86 | - </el-form-item> | ||
87 | - </el-form> | 59 | + <div style="padding-right: 20px"> |
60 | + <el-form | ||
61 | + :model="fileFrom" | ||
62 | + :rules="docRulesForm" | ||
63 | + label-position="right" | ||
64 | + label-width="100px" | ||
65 | + label-width="120px" | ||
66 | + ref="ruleForm"> | ||
67 | + <el-form-item label="名称" prop="name"> | ||
68 | + <el-input :size="$global.elementConfig.size.input" placeholder="请输入名称" clearable v-model="fileFrom.name"></el-input> | ||
69 | + </el-form-item> | ||
70 | + <el-form-item label="编码" prop="code"> | ||
71 | + <el-input :size="$global.elementConfig.size.input" placeholder="请输入编码" clearable v-model="fileFrom.code"></el-input> | ||
72 | + </el-form-item> | ||
73 | + <el-form-item label="分组" prop="group"> | ||
74 | + <el-input :size="$global.elementConfig.size.input" placeholder="请输入组Id" clearable v-model="fileFrom.groupId"></el-input> | ||
75 | + </el-form-item> | ||
76 | + <el-form-item label="文件" prop="file" > | ||
77 | + <el-upload | ||
78 | + :auto-upload="true" | ||
79 | + :before-upload="beforeAvatarUpload" | ||
80 | + :http-request="getFile" | ||
81 | + :multiple="false" | ||
82 | + :show-file-list="false"> | ||
83 | + <el-input :size="$global.elementConfig.size.input" placeholder="请上传文件" v-model="fileFrom.fileName" class="upload-systemConf"></el-input> | ||
84 | + </el-upload> | ||
85 | + </el-form-item> | ||
86 | + <el-form-item> | ||
87 | + <el-button :size="$global.elementConfig.size.button" @click="addFrom()" type="primary">保存 | ||
88 | + </el-button> | ||
89 | + <el-button :size="$global.elementConfig.size.button" @click="cancelBtn">取消</el-button> | ||
90 | + </el-form-item> | ||
91 | + </el-form> | ||
92 | + </div> | ||
88 | </template> | 93 | </template> |
89 | </cm-dialog> | 94 | </cm-dialog> |
90 | 95 |
@@ -7,15 +7,20 @@ export default { | @@ -7,15 +7,20 @@ export default { | ||
7 | radio: '0', | 7 | radio: '0', |
8 | docRulesForm: { | 8 | docRulesForm: { |
9 | name: [{ | 9 | name: [{ |
10 | - required: true, | ||
11 | - message: '请填写名称!', | ||
12 | - trigger: 'blur', | 10 | + required: true, |
11 | + message: '请填写名称!', | ||
12 | + trigger: 'blur' | ||
13 | }], | 13 | }], |
14 | code: [{ | 14 | code: [{ |
15 | required: true, | 15 | required: true, |
16 | message: '请填写编码!', | 16 | message: '请填写编码!', |
17 | - trigger: 'blur', | 17 | + trigger: 'blur' |
18 | }], | 18 | }], |
19 | + group: [{ | ||
20 | + required: true, | ||
21 | + message: '请填写组Id!', | ||
22 | + trigger: 'blur' | ||
23 | + }] | ||
19 | } | 24 | } |
20 | } | 25 | } |
21 | }, | 26 | }, |
@@ -39,20 +44,27 @@ export default { | @@ -39,20 +44,27 @@ export default { | ||
39 | align: 'center' | 44 | align: 'center' |
40 | }, | 45 | }, |
41 | { | 46 | { |
42 | - prop: 'img', | ||
43 | - label: '图片', | 47 | + prop: 'type', |
48 | + label: '类型', | ||
44 | sortable: true, | 49 | sortable: true, |
45 | align: 'center', | 50 | align: 'center', |
46 | - width: '300' | 51 | + width: '200' |
47 | }, | 52 | }, |
48 | { | 53 | { |
49 | - prop: 'type', | ||
50 | - label: '类型', | 54 | + prop: 'groupId', |
55 | + label: '分组', | ||
51 | sortable: true, | 56 | sortable: true, |
52 | align: 'center', | 57 | align: 'center', |
53 | width: '200' | 58 | width: '200' |
54 | }, | 59 | }, |
55 | { | 60 | { |
61 | + prop: 'img', | ||
62 | + label: '图片', | ||
63 | + sortable: true, | ||
64 | + align: 'center', | ||
65 | + width: '300' | ||
66 | + }, | ||
67 | + { | ||
56 | prop: 'createTime', | 68 | prop: 'createTime', |
57 | label: '创建时间', | 69 | label: '创建时间', |
58 | sortable: true, | 70 | sortable: true, |
@@ -79,6 +91,7 @@ export default { | @@ -79,6 +91,7 @@ export default { | ||
79 | }); | 91 | }); |
80 | //上传完后的图片预览 | 92 | //上传完后的图片预览 |
81 | let imageUrl = Vue.ref(''); | 93 | let imageUrl = Vue.ref(''); |
94 | + let titleName = Vue.ref('新增'); | ||
82 | let tableDataList = Vue.ref([]); | 95 | let tableDataList = Vue.ref([]); |
83 | let isAdd = Vue.ref(true); | 96 | let isAdd = Vue.ref(true); |
84 | let beforeAvatarUpload = (file) => { | 97 | let beforeAvatarUpload = (file) => { |
@@ -137,25 +150,34 @@ export default { | @@ -137,25 +150,34 @@ export default { | ||
137 | 150 | ||
138 | let cacheVisible = Vue.ref(false); | 151 | let cacheVisible = Vue.ref(false); |
139 | let openAddFile = () => { | 152 | let openAddFile = () => { |
153 | + titleName.value = '新增'; | ||
154 | + fileFrom.value = { | ||
155 | + id: '', | ||
156 | + pid: '', | ||
157 | + name: '', | ||
158 | + fileName: '', | ||
159 | + code: '', | ||
160 | + groupId: '', | ||
161 | + type: '', | ||
162 | + file: '', | ||
163 | + createTime: '', | ||
164 | + uploadFile:'' | ||
165 | + }; | ||
140 | cacheVisible.value = true; | 166 | cacheVisible.value = true; |
141 | } | 167 | } |
142 | - //保存 | ||
143 | - let addFile = () => { | ||
144 | - | ||
145 | - } | ||
146 | //关闭弹框 | 168 | //关闭弹框 |
147 | let cancelBtn = () => { | 169 | let cancelBtn = () => { |
148 | cacheVisible.value = false; | 170 | cacheVisible.value = false; |
149 | } | 171 | } |
150 | //修改 | 172 | //修改 |
151 | let handleUpdate = (row) => { | 173 | let handleUpdate = (row) => { |
174 | + titleName.value = '修改'; | ||
152 | cacheVisible.value = true; | 175 | cacheVisible.value = true; |
153 | fileFrom.value = row; | 176 | fileFrom.value = row; |
154 | isAdd.value = false; | 177 | isAdd.value = false; |
155 | } | 178 | } |
156 | let addFrom = () => { | 179 | let addFrom = () => { |
157 | let params = fileFrom.value; | 180 | let params = fileFrom.value; |
158 | - debugger | ||
159 | if (isAdd.value){ | 181 | if (isAdd.value){ |
160 | proxy.$http.uploadFile("/api-web/file/add", params, function (res) { | 182 | proxy.$http.uploadFile("/api-web/file/add", params, function (res) { |
161 | hasRefresh.value = false; | 183 | hasRefresh.value = false; |
@@ -164,7 +186,6 @@ export default { | @@ -164,7 +186,6 @@ export default { | ||
164 | cacheVisible.value = false; | 186 | cacheVisible.value = false; |
165 | getDataList(); | 187 | getDataList(); |
166 | } | 188 | } |
167 | - | ||
168 | }) | 189 | }) |
169 | }else { | 190 | }else { |
170 | proxy.$http.uploadFile("/api-web/file/update", params, function (res) { | 191 | proxy.$http.uploadFile("/api-web/file/update", params, function (res) { |
@@ -173,11 +194,12 @@ export default { | @@ -173,11 +194,12 @@ export default { | ||
173 | proxy.$global.showMsg("修改成功!"); | 194 | proxy.$global.showMsg("修改成功!"); |
174 | cacheVisible.value = false; | 195 | cacheVisible.value = false; |
175 | getDataList(); | 196 | getDataList(); |
197 | + }else { | ||
198 | + proxy.$global.showMsg(res.msg,'warning'); | ||
176 | } | 199 | } |
177 | 200 | ||
178 | }) | 201 | }) |
179 | } | 202 | } |
180 | - | ||
181 | } | 203 | } |
182 | // 挂载完 | 204 | // 挂载完 |
183 | Vue.onMounted(() => { | 205 | Vue.onMounted(() => { |
@@ -201,11 +223,11 @@ export default { | @@ -201,11 +223,11 @@ export default { | ||
201 | fileFrom, | 223 | fileFrom, |
202 | cacheVisible, | 224 | cacheVisible, |
203 | openAddFile, | 225 | openAddFile, |
204 | - addFile, | ||
205 | cancelBtn, | 226 | cancelBtn, |
206 | addFrom, | 227 | addFrom, |
207 | handleUpdate, | 228 | handleUpdate, |
208 | - isAdd | 229 | + isAdd, |
230 | + titleName | ||
209 | } | 231 | } |
210 | } | 232 | } |
211 | } | 233 | } |
1 | +<div class="container" :style="{'height':height+'px','max-height':height+'px','padding':'10px 0 10px 10px','background':'#fff','box-sizing':'border-box'}"> | ||
2 | + <div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%','padding-top':'3px'}"> | ||
3 | + <div class="search"> | ||
4 | + <div class="search-input flex-div-start"> | ||
5 | + <el-tooltip placement="bottom-start"> | ||
6 | + <template #content>第三方系统<br/>请求地址</template> | ||
7 | + <el-input :size="$global.elementConfig.size.input" v-model="keyword" placeholder="请输入关键字(回车搜索)" class="fault-book-input-text" /> | ||
8 | + </el-tooltip> | ||
9 | + <el-button :size="$global.elementConfig.size.button" type="primary" @click="getDetailList()">查询</el-button> | ||
10 | + </div> | ||
11 | + <el-button :size="$global.elementConfig.size.button" @click="handleAdd()">新增</el-button> | ||
12 | + </div> | ||
13 | + <div class="search-table"> | ||
14 | + <el-table | ||
15 | + :data="tableData" | ||
16 | + style="width: 100%;margin: 0px 0px; font-size:13.5px;" | ||
17 | + row-key="id" | ||
18 | + border | ||
19 | + :tree-props="{ children: 'authorizeList'}" | ||
20 | + header-row-class-name="tbl-header-class" | ||
21 | + > | ||
22 | + <el-table-column type="index" label="序号" align="center" width="80"/> | ||
23 | + <el-table-column prop="name" label="第三方系统" sortable=true align="center" width="350" /> | ||
24 | + <el-table-column prop="detail" label="系统请求地址" sortable=true align="center" width="470" /> | ||
25 | + <el-table-column prop="nickName" label="授权用户" sortable=true align="center" width="250" /> | ||
26 | + <el-table-column prop="sort" label="排序" sortable=true align="center" width="100" /> | ||
27 | + <el-table-column prop="createTime" label="创建时间" sortable=true align="center"width="300" /> | ||
28 | + <el-table-column fixed="right" label="操作" width="150" align="center"> | ||
29 | + <template #default="scope"> | ||
30 | + <div class="list-handle"> | ||
31 | + <span class="icon-bg" v-if="scope.row.type == '0'"> | ||
32 | + <i @click="handleAuth(scope.row)" class="iconfont icon-icon--quanxian" title="授权"></i> | ||
33 | + </span> | ||
34 | + <span class="icon-bg" v-if="scope.row.type == '0'"> | ||
35 | + <i @click="handleUpdate(scope.row)" class="el-icon-edit-outline" title="修改"></i> | ||
36 | + </span> | ||
37 | + <span class="icon-bg"> | ||
38 | + <i @click="handleDelete(scope.row)" class="el-icon-delete" title="删除"></i> | ||
39 | + </span> | ||
40 | + </div> | ||
41 | + </template> | ||
42 | + </el-table-column> | ||
43 | + </el-table> | ||
44 | + </div> | ||
45 | + | ||
46 | + | ||
47 | + <cm-userright :isUser="false" :buttonTexts="['删除', '添加']" :showDialogVisible="showUserDialogVisible" :titles="['所有用户', '已添加用户']" | ||
48 | + :userArr="userList" :selectedArr="userFileRight" @callback="selectUser" @hideDialog="showUserDialog" :showOrg="false" :showGroup="false" | ||
49 | + title="选择用户"></cm-userright> | ||
50 | + </div> | ||
51 | +</div> | ||
52 | + | ||
53 | + | ||
54 | +<!--新增编辑弹框--> | ||
55 | +<cm-dialog :showDialogVisible="cacheVisible" :showFooter="false" :title="titleName" @hidedialog="cancelBtn" | ||
56 | + width="500px"> | ||
57 | + <template v-slot> | ||
58 | + <div style="padding-right: 20px"> | ||
59 | + <el-form | ||
60 | + :model="confAdd" | ||
61 | + :rules="docRulesForm" | ||
62 | + label-position="right" | ||
63 | + label-width="100px" | ||
64 | + label-width="120px" | ||
65 | + ref="ruleForm"> | ||
66 | + <el-form-item label="系统名称" prop="name"> | ||
67 | + <el-input :size="$global.elementConfig.size.input" placeholder="请输入系统名称" clearable v-model="confAdd.name"></el-input> | ||
68 | + </el-form-item> | ||
69 | + <el-form-item label="请求地址" prop="detail"> | ||
70 | + <el-input :size="$global.elementConfig.size.input" placeholder="请输入请求地址或事件" clearable v-model="confAdd.detail"></el-input> | ||
71 | + </el-form-item> | ||
72 | + <el-form-item label="排序" prop="detail"> | ||
73 | + <el-input :size="$global.elementConfig.size.input" placeholder="请输入排序" clearable v-model="confAdd.sort"></el-input> | ||
74 | + </el-form-item> | ||
75 | + | ||
76 | + <el-form-item> | ||
77 | + <el-button :size="$global.elementConfig.size.button" @click="handleConfAdd" type="primary">保存</el-button> | ||
78 | + <el-button :size="$global.elementConfig.size.button" @click="cancelBtn">取消</el-button> | ||
79 | + </el-form-item> | ||
80 | + </el-form> | ||
81 | + </div> | ||
82 | + </template> | ||
83 | +</cm-dialog> |
1 | +export default { | ||
2 | + name:"thirdSet", | ||
3 | + template:"", | ||
4 | + data() { | ||
5 | + return { | ||
6 | + docRulesForm: { | ||
7 | + name: [{ | ||
8 | + required: true, | ||
9 | + message: '请填写系统名称!', | ||
10 | + trigger: 'blur' | ||
11 | + }], | ||
12 | + detail: [{ | ||
13 | + required: true, | ||
14 | + message: '请填写请求地址或事件!', | ||
15 | + trigger: 'blur' | ||
16 | + }], | ||
17 | + sort: [{ | ||
18 | + required: true, | ||
19 | + message: '请填写排序!', | ||
20 | + trigger: 'blur' | ||
21 | + }] | ||
22 | + } | ||
23 | + } | ||
24 | + }, | ||
25 | + setup(props,{attrs,slots,emit}){ | ||
26 | + const {proxy} = Vue.getCurrentInstance(); | ||
27 | + let height = Vue.ref(window.innerHeight); | ||
28 | + //下拉框 | ||
29 | + let options = Vue.ref([]); | ||
30 | + let authAdd = Vue.ref({ | ||
31 | + tpsId:'', | ||
32 | + userName:'', | ||
33 | + roleId:'' | ||
34 | + }) | ||
35 | + let confAdd = Vue.ref({ | ||
36 | + name: '', | ||
37 | + detail: '', | ||
38 | + sort:'' | ||
39 | + }) | ||
40 | + let tableData = Vue.ref([]); | ||
41 | + let cacheVisible = Vue.ref(false); | ||
42 | + let titleName = Vue.ref('新增'); | ||
43 | + let keyword = Vue.ref(''); | ||
44 | + let isAdd = Vue.ref(true); | ||
45 | + let showUserDialogVisible = Vue.ref(false); | ||
46 | + let userFileRight = Vue.ref([]); | ||
47 | + //获取用户 | ||
48 | + let userList = Vue.ref([]); | ||
49 | + | ||
50 | + | ||
51 | + // 获取系统 | ||
52 | + let getDetailList = () => { | ||
53 | + proxy.$http.get(`/api-web/thirdParty/conf/list`, {keywords:keyword.value}, function (res) { | ||
54 | + if (res && res.success == true) { | ||
55 | + tableData.value = res.data; | ||
56 | + tableData.value.forEach(function (e) { | ||
57 | + let report = {} | ||
58 | + report.label = e.name; | ||
59 | + report.value = e.id; | ||
60 | + options.value.push(report) | ||
61 | + }); | ||
62 | + } | ||
63 | + }) | ||
64 | + }; | ||
65 | + | ||
66 | + let getUser = (arr) => { | ||
67 | + let types = arr.map(function (v) { | ||
68 | + return v.username; | ||
69 | + }); | ||
70 | + authAdd.value.userName = types.join(','); | ||
71 | + } | ||
72 | + | ||
73 | + //获取授权 | ||
74 | + let handleAuth = (row) =>{ | ||
75 | + showUserDialog(true) | ||
76 | + let tpsId = row.id; | ||
77 | + authAdd.value.tpsId = tpsId; | ||
78 | + let user=[]; | ||
79 | + let role=[]; | ||
80 | + proxy.$http.get(`/api-web/thirdParty/auth/list`, {tpsId:tpsId}, function (res) { | ||
81 | + if (res && res.success) { | ||
82 | + if (res.map.USER){ | ||
83 | + res.map.USER.map(item=>{ | ||
84 | + user.push(item.userName) | ||
85 | + }) | ||
86 | + } | ||
87 | + if (res.map.ROLE){ | ||
88 | + res.map.ROLE.map(item=>{ | ||
89 | + role.push(item.roleId); | ||
90 | + }) | ||
91 | + } | ||
92 | + let params={ | ||
93 | + USER:user, | ||
94 | + ROLE:role | ||
95 | + } | ||
96 | + userFileRight.value = params; | ||
97 | + } | ||
98 | + }) | ||
99 | + } | ||
100 | + | ||
101 | + // 获取用户选择的用户 | ||
102 | + let selectUser = (userObj) => { | ||
103 | + let userArr = userObj.user; | ||
104 | + let roleArr = userObj.role; | ||
105 | + let names = []; | ||
106 | + let rule = []; | ||
107 | + userArr.map(function (v) { | ||
108 | + names.push(v.username); | ||
109 | + }) | ||
110 | + roleArr.map(function (v) { | ||
111 | + rule.push(v.id); | ||
112 | + }) | ||
113 | + authAdd.value.userName = names.join(','); | ||
114 | + authAdd.value.roleId = rule.join(','); | ||
115 | + proxy.$http.post(`/api-web/thirdParty/auth/add`, authAdd.value, function (res) { | ||
116 | + if (res && res.success){ | ||
117 | + proxy.$global.showMsg('授权成功','success'); | ||
118 | + getDetailList(); | ||
119 | + }else { | ||
120 | + proxy.$global.showMsg(res.msg,'warning'); | ||
121 | + } | ||
122 | + }) | ||
123 | + } | ||
124 | + | ||
125 | + //获取用户数据 | ||
126 | + let getUserList = () => { | ||
127 | + proxy.userList = []; | ||
128 | + // 查询信息中心的用户 | ||
129 | + proxy.$http.get("/api-user/org/getOrgUserList?orgCode=xxzx", {}, function (res) { | ||
130 | + if (res && res.data) { | ||
131 | + res.data.map(function (v) { | ||
132 | + let desc = []; | ||
133 | + let orgName = v.orgName; | ||
134 | + let nickname = v.nickname; | ||
135 | + if (orgName) { | ||
136 | + desc.push(orgName); | ||
137 | + } | ||
138 | + if (nickname) { | ||
139 | + desc.push(nickname); | ||
140 | + } | ||
141 | + proxy.userList.push({ | ||
142 | + value: v.username, | ||
143 | + type: 'USER', | ||
144 | + desc: v.nickname, | ||
145 | + props: v | ||
146 | + }) | ||
147 | + }); | ||
148 | + | ||
149 | + } | ||
150 | + }, function () { | ||
151 | + }, false) | ||
152 | + } | ||
153 | + | ||
154 | + /** | ||
155 | + * 获取用户授权 | ||
156 | + */ | ||
157 | + let showUserDialog = (flg) => { | ||
158 | + showUserDialogVisible.value = flg; | ||
159 | + } | ||
160 | + | ||
161 | + let handleAdd = () =>{ | ||
162 | + cacheVisible.value = true; | ||
163 | + titleName.value = '新增'; | ||
164 | + isAdd.value = true; | ||
165 | + confAdd.value = { | ||
166 | + name: '', | ||
167 | + detail: '' | ||
168 | + } | ||
169 | + } | ||
170 | + | ||
171 | + | ||
172 | + | ||
173 | + // 新增或修改配置 | ||
174 | + let handleConfAdd = () => { | ||
175 | + let url = ''; | ||
176 | + let msg = ''; | ||
177 | + if (isAdd.value){ | ||
178 | + url='/api-web/thirdParty/conf/add'; | ||
179 | + msg='新增成功' | ||
180 | + }else { | ||
181 | + url='/api-web/thirdParty/conf/update'; | ||
182 | + msg='修改成功' | ||
183 | + } | ||
184 | + proxy.$http.post(url, confAdd.value, function (res) { | ||
185 | + if (res && res.success){ | ||
186 | + proxy.$global.showMsg(msg,'success'); | ||
187 | + cacheVisible.value = false; | ||
188 | + getDetailList(); | ||
189 | + }else { | ||
190 | + proxy.$global.showMsg(res.msg,'warning'); | ||
191 | + } | ||
192 | + }) | ||
193 | + } | ||
194 | + // 删除 | ||
195 | + let handleDelete = (row) => { | ||
196 | + let url = ''; | ||
197 | + let msg = ''; | ||
198 | + let params = { | ||
199 | + idList:row.id | ||
200 | + } | ||
201 | + if (row.type == 0){ | ||
202 | + url='/api-web/thirdParty/conf/delete'; | ||
203 | + msg='您确实删除第三方系统吗?' | ||
204 | + }else { | ||
205 | + url='/api-web/thirdParty/auth/delete'; | ||
206 | + msg='您确实删除授权吗?' | ||
207 | + } | ||
208 | + proxy.$global.confirm(msg, function () {proxy.$http.get(url, params, function (res) { | ||
209 | + if (res && res.success){ | ||
210 | + proxy.$global.showMsg('删除成功','success'); | ||
211 | + cacheVisible.value = false; | ||
212 | + getDetailList(); | ||
213 | + }else { | ||
214 | + proxy.$global.showMsg(res.msg,'warning'); | ||
215 | + } | ||
216 | + }) | ||
217 | + }) | ||
218 | + } | ||
219 | + let handleUpdate = (row) =>{ | ||
220 | + cacheVisible.value = true; | ||
221 | + isAdd.value = false; | ||
222 | + titleName.value = '修改'; | ||
223 | + confAdd.value.id = row.id; | ||
224 | + confAdd.value.name = row.name; | ||
225 | + confAdd.value.detail = row.detail; | ||
226 | + } | ||
227 | + | ||
228 | + //关闭弹框 | ||
229 | + let cancelBtn = () => { | ||
230 | + cacheVisible.value = false; | ||
231 | + } | ||
232 | + | ||
233 | + | ||
234 | + Vue.onMounted(()=>{ | ||
235 | + getUserList(); | ||
236 | + getDetailList(); | ||
237 | + }) | ||
238 | + | ||
239 | + return { | ||
240 | + height, | ||
241 | + getUser, | ||
242 | + options, | ||
243 | + authAdd, | ||
244 | + getDetailList, | ||
245 | + tableData, | ||
246 | + handleAdd, | ||
247 | + confAdd, | ||
248 | + cacheVisible, | ||
249 | + handleConfAdd, | ||
250 | + titleName, | ||
251 | + cancelBtn, | ||
252 | + keyword, | ||
253 | + handleDelete, | ||
254 | + handleUpdate, | ||
255 | + isAdd, | ||
256 | + handleAuth, | ||
257 | + showUserDialog, | ||
258 | + showUserDialogVisible, | ||
259 | + selectUser, | ||
260 | + userFileRight, | ||
261 | + userList | ||
262 | + } | ||
263 | + } | ||
264 | +} |
@@ -108,23 +108,22 @@ | @@ -108,23 +108,22 @@ | ||
108 | <!--//end lsq 2022-03-13--> | 108 | <!--//end lsq 2022-03-13--> |
109 | <li class="layui-nav-item" id="systems-select" lay-unselect> | 109 | <li class="layui-nav-item" id="systems-select" lay-unselect> |
110 | <script lay-done="layui.element.render('nav', 'layadmin-systems');" | 110 | <script lay-done="layui.element.render('nav', 'layadmin-systems');" |
111 | - lay-url="{{sessionStorage.getItem('domainName')}}/api-web/manage/ddic/list?ddicCategory=systems" | 111 | + lay-url="{{sessionStorage.getItem('domainName')}}/api-web/thirdParty/getList" |
112 | template | 112 | template |
113 | type="text/html"> | 113 | type="text/html"> |
114 | <a href="javascript:;" title="第三方系统"> | 114 | <a href="javascript:;" title="第三方系统"> |
115 | <span class="layui-icon layui-icon-slider"></span> | 115 | <span class="layui-icon layui-icon-slider"></span> |
116 | </a> | 116 | </a> |
117 | <dl class="layui-nav-child"> | 117 | <dl class="layui-nav-child"> |
118 | - {{# d.data.sort(function (a, b) { return a.ddicSort > b.ddicSort ? 1 : -1; })}} | ||
119 | {{# if(d.data && d.data.length == 0){ }} | 118 | {{# if(d.data && d.data.length == 0){ }} |
120 | {{# var sysObj = document.querySelector('#systems-select'); }} | 119 | {{# var sysObj = document.querySelector('#systems-select'); }} |
121 | {{# sysObj != null ? sysObj.remove() :''; }} | 120 | {{# sysObj != null ? sysObj.remove() :''; }} |
122 | {{# } }} | 121 | {{# } }} |
123 | {{# layui.each(d.data, function(index, item){ }} | 122 | {{# layui.each(d.data, function(index, item){ }} |
124 | <dd style="text-align: left;" lay-filter="layadmin-systems"> | 123 | <dd style="text-align: left;" lay-filter="layadmin-systems"> |
125 | - <a href="javascript:;" layadmin-event="openOtherSystem" data-code="{{item.ddicCode}}" | ||
126 | - title="{{item.ddicName}}"> | ||
127 | - <i class="iconfont icon-tree {{ item.ddicDesc }}"/> {{ item.ddicName }} | 124 | + <a href="javascript:;" layadmin-event="openOtherSystem" data-code="{{item.detail}}" |
125 | + title="{{item.name}}"> | ||
126 | + <i class="iconfont icon-tree {{ item.name }}"/> {{ item.name }} | ||
128 | </a> | 127 | </a> |
129 | </dd> | 128 | </dd> |
130 | {{# }); }} | 129 | {{# }); }} |
@@ -273,7 +273,12 @@ const routes = [{ | @@ -273,7 +273,12 @@ const routes = [{ | ||
273 | path: '/vue3/license', | 273 | path: '/vue3/license', |
274 | name: 'license', | 274 | name: 'license', |
275 | component: () => myImport('views/license/index') | 275 | component: () => myImport('views/license/index') |
276 | - } | 276 | + }, |
277 | + { | ||
278 | + path: '/vue3/thirdSet', | ||
279 | + name: 'thirdSet', | ||
280 | + component: () => myImport('views/thirdSet/index') | ||
281 | + }, | ||
277 | ]; | 282 | ]; |
278 | 283 | ||
279 | // hash模式: createWebHashHistory | 284 | // hash模式: createWebHashHistory |
-
Please register or login to post a comment