Browse Source

【接口看板】1、登录及路由优化,2、用户信息维护页面功能开发,3、主表格组件权限到操作列按钮封装

faster_AG_grid
安虹睿 1 year ago
parent
commit
74a1895fb2
  1. 3
      PC/InterFace.Dash/public/config.js
  2. 9
      PC/InterFace.Dash/src/api/wms-auth.js
  3. 3
      PC/InterFace.Dash/src/components/tablePagination/index.vue
  4. 3
      PC/InterFace.Dash/src/components/umyTable/index.vue
  5. 4
      PC/InterFace.Dash/src/mixins/TableHeaderMixins.js
  6. 10
      PC/InterFace.Dash/src/mixins/TableMixins.js
  7. 19
      PC/InterFace.Dash/src/permission.js
  8. 2
      PC/InterFace.Dash/src/store/modules/permission.js
  9. 3
      PC/InterFace.Dash/src/utils/defaultButtons.js
  10. 7
      PC/InterFace.Dash/src/views/login/index.vue
  11. 4
      PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue
  12. 622
      PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue
  13. 22
      PC/InterFace.Dash/src/views/menuList/ExportCustomUserSetting.vue

3
PC/InterFace.Dash/public/config.js

@ -1,10 +1,7 @@
// dev_win // dev_win
window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60068' window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60068'
// window.SITE_CONFIG['baseApi'] = 'http://192.168.0.190:60068'
window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60068' window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60068'
// window.SITE_CONFIG['authApi'] = 'http://192.168.0.190:60068'
window.SITE_CONFIG['loginApi'] = 'http://dev.ccwin-in.com:60065' window.SITE_CONFIG['loginApi'] = 'http://dev.ccwin-in.com:60065'
// window.SITE_CONFIG['loginApi'] = 'http://192.168.0.190:60065'
window.SITE_CONFIG['businessApi'] = 'http://dev.ccwin-in.com:10097' window.SITE_CONFIG['businessApi'] = 'http://dev.ccwin-in.com:10097'
//是否登录配置信息【loginName】 //是否登录配置信息【loginName】
window.SITE_CONFIG['isConfigLogin'] = false window.SITE_CONFIG['isConfigLogin'] = false

9
PC/InterFace.Dash/src/api/wms-auth.js

@ -195,10 +195,11 @@ export function getusersID(data) {
}) })
} }
//重置密码 //修改登录用户的密码-强密码规则
export function resetPassword(id) { export function postLoginUserInfo(data, id) {
return request({ return request({
url: authApi + '/identity/users/reset-password/' + id, url: authApi + '/identity/users/change-password/' + id,
method: 'post' method: 'post',
data
}) })
} }

3
PC/InterFace.Dash/src/components/tablePagination/index.vue

@ -307,7 +307,8 @@ export default {
_list.push(item) _list.push(item)
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(this.noUsePermissionBtn.indexOf(item.name) < 0){
item.permission = [this.$route.name+'.'+item.name] let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+item.name]
}else{ }else{
item.permission = [] item.permission = []
} }

3
PC/InterFace.Dash/src/components/umyTable/index.vue

@ -167,6 +167,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
v-permission="itemButton.permission"
:style="{color:itemButton.color || '#409EFF'}" :style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_right(scope.row, itemButton, indexButton)" @click="buttonOperationClick_right(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
@ -212,8 +213,10 @@ import { formatTimeStrToStr } from "@/utils/formatTime";
import _ from "lodash"; import _ from "lodash";
import { getMatchRegConformValue } from "@/utils/index" import { getMatchRegConformValue } from "@/utils/index"
import showCopyJsonPop from "@/components/showCopyJsonPop" import showCopyJsonPop from "@/components/showCopyJsonPop"
import permission from "@/directive/permission/index"
export default { export default {
name: "currenTable", name: "currenTable",
directives: { permission },
components:{ showCopyJsonPop }, components:{ showCopyJsonPop },
filters: { filters: {
formatDate(time) { formatDate(time) {

4
PC/InterFace.Dash/src/mixins/TableHeaderMixins.js

@ -68,10 +68,10 @@ export const TableHeaderMixins = {
// this.$store.dispatch("app/appMainLoading", true) // this.$store.dispatch("app/appMainLoading", true)
} }
// 新增(原始前端写死配置) // 新增(原始前端写死配置)
else if (val == 'newly') { else if (val == 'Create') {
this.formTitle = "新增" + this.$route.meta.title; this.formTitle = "新增" + this.$route.meta.title;
this.formReveal = true this.formReveal = true
this.theEvent = "newly" this.theEvent = "Create"
this.displayDialog.newDialog = true; this.displayDialog.newDialog = true;
} }
// Api新增(参数配置从api获取) // Api新增(参数配置从api获取)

10
PC/InterFace.Dash/src/mixins/TableMixins.js

@ -51,15 +51,19 @@ export const tableMixins = {
}, },
methods: { methods: {
// 主表-右侧操作列基础按钮 // 主表-右侧操作列基础按钮
buttonOperationList_rightBase(){ buttonOperationList_rightBase(op_e,op_d){
return [{ return [{
label:'编辑', label:'编辑',
name:'edit', name:'edit',
color:'#ff9000' color:'#ff9000',
hide:op_e && op_e.hide ? op_e.hide : false,
permission:op_e && op_e.permission ? op_e.permission : []
},{ },{
label:'删除', label:'删除',
name:'delete', name:'delete',
color:'red' color:'red',
hide:op_d && op_d.hide ? op_d.hide : false,
permission:op_d && op_d.permission ? op_d.permission : []
}] }]
}, },
// 主表-右侧操作列基础按钮 // 主表-右侧操作列基础按钮

19
PC/InterFace.Dash/src/permission.js

@ -12,7 +12,7 @@ NProgress.configure({
}) // NProgress Configuration }) // NProgress Configuration
const whiteList = ['/login','/callback'] // no redirect whitelist const whiteList = ['/login','/callback'] // no redirect whitelist
const noUserMsg = '获取用户信息失败,请重新登录 !' const loginErr = '登录失败,请重新登录 !'
const getErrMsg = '数据获取失败 !' const getErrMsg = '数据获取失败 !'
@ -45,10 +45,9 @@ const toPageInit = async (to, from, next) => {
// toNextHandle(to, from, next) // toNextHandle(to, from, next)
// }) // })
// .catch(()=>{ // .catch(()=>{
// // todo-fast:接口恢复后更改 // // toNextHandle(to, from, next)
// toNextHandle(to, from, next) // Message.error(loginErr)
// // Message.error(noUserMsg) // pageToLogin(to, from, next)
// // pageToLogin(to, from, next)
// }) // })
// return // return
// } // }
@ -80,7 +79,7 @@ const toNextHandle = async (to, from, next) => {
.then(res=>{ .then(res=>{
// 没有权限(token失效处理) // 没有权限(token失效处理)
if(!res || res.length <=0){ if(!res || res.length <=0){
Message.error('用户无权限或者token失效,请重新登录') Message.error('用户无权限或者token失效,请配置权限或重新登录')
store.dispatch("user/logout") store.dispatch("user/logout")
} }
}) })
@ -142,6 +141,7 @@ router.beforeEach(async (to, from, next) => {
} else { } else {
// 如果有单点登录方式使用下方配置 // 如果有单点登录方式使用下方配置
// mgr.signinRedirect(); //执行重定向 // mgr.signinRedirect(); //执行重定向
if(isAutoLogin){ if(isAutoLogin){
let _username = localStorage.getItem("isConfigLogin") && localStorage.getItem("isConfigLogin") != 'false' ? localStorage.getItem("configLoginName") : to.query.loginName let _username = localStorage.getItem("isConfigLogin") && localStorage.getItem("isConfigLogin") != 'false' ? localStorage.getItem("configLoginName") : to.query.loginName
await store.dispatch('user/login', { await store.dispatch('user/login', {
@ -152,10 +152,9 @@ router.beforeEach(async (to, from, next) => {
toPageInit(to, from, next) toPageInit(to, from, next)
}) })
.catch(()=>{ .catch(()=>{
// todo-fast:接口恢复后更改 // toNextHandle(to, from, next)
toNextHandle(to, from, next) Message.error(loginErr)
// Message.error(noUserMsg) pageToLogin(to, from, next)
// pageToLogin(to, from, next)
}) })
}else{ }else{
console.log('没有token,不是登录页,不是自动登录,pageToLogin') console.log('没有token,不是登录页,不是自动登录,pageToLogin')

2
PC/InterFace.Dash/src/store/modules/permission.js

@ -169,7 +169,7 @@ const actions = {
} }
// 存储所有的表名 // 存储所有的表名
commit('SET_TABLESNAME', _menuList) commit('SET_TABLESNAME', _menuList)
// 数据模拟,todo-new:接口获取 // 数据模拟,todo-faster:接口获取
let _treeMenusAll = null//树形菜单 let _treeMenusAll = null//树形菜单
// _treeMenusAll = [ // _treeMenusAll = [
// {name:"aaaaaaa"}, // {name:"aaaaaaa"},

3
PC/InterFace.Dash/src/utils/defaultButtons.js

@ -13,7 +13,7 @@ export function defaultAddBtn(option) {
type: "primary", type: "primary",
icon: "el-icon-plus", icon: "el-icon-plus",
label: i18n.t('btns.add'), label: i18n.t('btns.add'),
name: "newly", name: "Create",
size: "mini", size: "mini",
background:"#31bb99" background:"#31bb99"
}) })
@ -123,5 +123,6 @@ function __defaultBtnOption(option,specific){
isDetailExport:option && option.isDetailExport ? option.isDetailExport : false, isDetailExport:option && option.isDetailExport ? option.isDetailExport : false,
isRedundance:option && option.isRedundance ? option.isRedundance : false, isRedundance:option && option.isRedundance ? option.isRedundance : false,
permission:option && option.permission ? option.permission : null, permission:option && option.permission ? option.permission : null,
clientScope:option && option.clientScope ? option.clientScope : null,
} }
} }

7
PC/InterFace.Dash/src/views/login/index.vue

@ -38,10 +38,9 @@
<svg-icon icon-class="svg_password" /> <svg-icon icon-class="svg_password" />
</span> </span>
<el-input <el-input
:key="passwordType"
ref="password" ref="password"
v-model="loginForm.password" v-model="loginForm.password"
:type="passwordType" :type="passwordType == 'svg_password' ? 'password' : 'text'"
placeholder="密码" placeholder="密码"
name="password" name="password"
tabindex="2" tabindex="2"
@ -171,8 +170,10 @@ export default {
}) })
}) })
.catch((error) => { .catch((error) => {
this.$message.error('用户名或密码错误!')
this.loading = false this.loading = false
if(!error){
this.$message.error('用户名或密码错误!')
}
}) })
} else { } else {
console.log('error submit!!') console.log('error submit!!')

4
PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue

@ -130,7 +130,7 @@
<el-dialog <el-dialog
:title="formTitle" :title="formTitle"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="600px" width="800px"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form <el-form
@ -138,8 +138,6 @@
:model="form" :model="form"
label-width="70px" label-width="70px"
:rules="rules" :rules="rules"
size="small"
:inline="true"
> >
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input v-model="form.name" style="width: 380px" maxlength="23" /> <el-input v-model="form.name" style="width: 380px" maxlength="23" />

622
PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue

@ -1,19 +1,637 @@
<template> <template>
<div>AbpIdentityMarkUsers</div> <div class="appMainPage" v-loading="loading">
<div class="main">
<div class="table-active">
<div class="bttton-box">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleCreate"
size="mini"
v-permission="['AbpIdentity.Users.Create']"
>创建用户</el-button
>
<el-button
type="success"
icon="el-icon-refresh"
@click.native.prevent="Createview"
size="mini"
>刷新</el-button
>
</div>
<div class="query-box">
<!-- 搜索 -->
<searchNormal
ref="normalSearch_UserManage"
@searchNormalClick="filtrate"
@searchNormalClear="filtrate"
></searchNormal>
</div>
</div>
<el-table
ref="multipleTable"
:data="tableData"
height="calc(100vh - 260px)"
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
:border="true"
>
<el-table-column :align="'center'" type="selection" width="55" />
<el-table-column
prop="userName"
label="用户名"
width="180"
:align="'left'"
sortable="custom"
/>
<el-table-column
prop="name"
label="姓名"
width="180"
:align="'left'"
sortable="custom"
/>
<el-table-column
prop="isActive"
label="是否启用"
sortable="custom"
:align="'center'"
width="180"
>
<template slot-scope="scope">
<span>{{ scope.row['isActive'] | trigger('whetherOrNot', "label") }}</span>
</template>
</el-table-column>
<el-table-column label="操作" :align="'center'" width="230">
<template slot-scope="scope">
<el-button
type="text"
@click="Update(scope.row)"
v-permission="['AbpIdentity.Users.Update']"
v-if="scope.row.name == 'admin' ? false : true"
>编辑</el-button>
<el-button
type="text"
@click="deleteUser(scope.row)"
v-if="scope.row.name == 'admin' ? false : true"
v-permission="['AbpIdentity.Users.Delete']"
style="color:red"
>删除用户</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="Footer">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.currentPage"
:page-sizes="[10, 15, 20]"
:page-size="queryInfo.pagesize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
<el-button
type="primary"
size="mini"
style="margin-left: 10px; background-color: #409eff"
>确定</el-button
>
</div>
<el-dialog
:title="formTitle"
:visible.sync="dialogVisible"
width="800px"
:close-on-click-modal="false"
:modal-append-to-body="false"
:append-to-body="false"
>
<el-form
ref="form"
:model="form"
label-width="70px"
:rules="rules"
>
<el-form-item label="用户名" prop="userName">
<el-input
v-model="form.userName"
maxlength="20"
/>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" maxlength="20" />
</el-form-item>
<el-form-item label="角色" prop="roleNames">
<el-select
:disabled="!checkPermission(['AbpIdentity.Users.ManagePermissions']) && isEdit"
v-model="form.roleNames"
multiple
style="width: 100%"
placeholder="请选择"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="IsActive">
<el-select
v-model="form.IsActive"
style="width: 100%"
placeholder="请选择"
>
<el-option
v-for="item in userOptions('whetherOrNot')"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="密码" prop="password" v-if="!isEdit">
<el-input
ref="password"
v-model="form.password"
maxlength="16"
minlength="6"
:type="passwordType"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="resetform"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { isvalidPhone } from "@/utils/validate";
import checkPermission from '@/utils/permission'
import {
getPageListUsers,
usersroles,
postCreateUser,
postUpdateUser,
postDeleteUser,
getusersID,
} from "@/api/wms-auth";
import permission from "@/utils/permission/index";
import searchNormal from "@/components/searchNormal/index.vue"
export default { export default {
directives: { permission },
components:{
searchNormal
},
name:"AbpIdentityMarkUsers", name:"AbpIdentityMarkUsers",
data() { data() {
// //
const validPhone = (rule, value, callback) => {
if (!value) {
callback(new Error("请输入电话号码"));
} else if (!isvalidPhone(value)) {
callback(new Error("请输入正确的11位手机号码"));
} else {
callback();
}
};
const validName = (rule, value, callback) => {
if (!value) {
callback(new Error("请输入登录名称"));
} else if (/[\u4E00-\u9FA5]/g.test(value)) {
callback(new Error("登录名不能输入汉字"));
} else {
callback();
}
};
//
// const validpassword = (rule, value, callback) => {
// if (!value) {
// callback(new Error(""));
// } else {
// if (
// /^(?=.*\d)(?=.*[a-z]).{6,16}$/.test(
// value
// )
// ) {
// callback();
// } else {
// callback(new Error(",,6"));
// }
// }
// };
//
// const validpassword = (rule, value, callback) => {
// if (!value) {
// callback(new Error(""));
// } else {
// if (
// /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,16}$/.test(
// value
// )
// ) {
// callback();
// } else {
// callback(new Error(",,6"));
// }
// }
// };
//
const validpassword = (rule, value, callback) => {
if (!value) {
callback(new Error("请输入密码"));
} else {
if (
/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~@#$%\*-\+=:,\\?\[\]\{}]).{6,16}$/.test(
value
)
) {
callback();
} else {
callback(new Error("密码必须包含大小写,数字与特殊字符混合,最小长度为6位"));
}
}
};
const checkEmail = (rule, value, callback) => {
const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
if (!value) {
return callback(new Error("邮箱不能为空"));
}
setTimeout(() => {
if (mailReg.test(value)) {
callback();
} else {
callback(new Error("请输入正确的邮箱格式"));
}
}, 100);
};
return { return {
loading:false,
//
dialogVisible: false,
//
isEdit: false,
//title
formTitle: "",
//
total: 0,
//
queryInfo: {
//
currentPage: 1,
//
pagesize: 20,
Sorting: "",
},
//
options: [],
//ID
usersId: "",
//
concurrencyStamp: "",
//
form: {
userName: "",
phoneNumber: "",
name: "",
email: "",
roleNames: [],
password: "",
surname: "",
lockoutEnabled: true,
IsActive: true,
},
//
passwordType: "password",
//
multipleSelection: [],
//table
tableData: [],
rules: {
userName: [
{ required: true, trigger: "blur", validator: validName },
{
min: 2,
max: 20,
message: "长度在 2 到 20 个字符",
trigger: "blur",
},
],
name: [
{ required: true, trigger: "blur", message: "请输入姓名" },
{
min: 2,
max: 20,
message: "长度在 2 到 20 个字符",
trigger: "blur",
},
],
email: [{ required: true, validator: checkEmail, trigger: "blur" }],
phoneNumber: [
{ required: true, trigger: "blur", validator: validPhone },
],
password: [
{ required: true, trigger: "blur", message: "请输入密码" },
{
min: 6,
max: 16,
message: "长度在 6 到 16 个字符",
trigger: "blur",
},
],
roleNames: [
{ required: true, message: "请选择角色", trigger: "change" },
],
},
}; };
}, },
created() {
//
usersroles().then((res) => {
this.options = res.items;
});
},
mounted() { mounted() {
this.pageList();
}, },
methods: { methods: {
checkPermission,
//
userOptions(val){
let options = this.$staticOptions[val]
return options()
},
//table
pageList(val) {
this.loading = true
const data = {
Filter: val || '',
Sorting: this.queryInfo.Sorting,
SkipCount: (this.queryInfo.currentPage - 1) * this.queryInfo.pagesize,
MaxResultCount: this.queryInfo.pagesize,
};
getPageListUsers(data).then((res) => {
this.loading = false
const data = res;
this.total = data.totalCount;
this.tableData = data.items;
}).catch(()=>{
this.loading = false
});
},
//
showPwd() {
if (this.passwordType === "password") {
this.passwordType = "";
} else {
this.passwordType = "password";
}
this.$nextTick(() => {
this.$refs.password.focus();
});
},
//
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.queryInfo.Sorting = "";
this.handleFilter();
return;
}
this.queryInfo.Sorting = prop + " " + order;
this.handleFilter();
},
//
handleFilter() {
this.queryInfo.currentPage = 1;
this.pageList();
},
//
filtrate(val) {
this.queryInfo.currentPage = 1;
this.pageList(val);
},
//
handleSizeChange(val) {
this.queryInfo.pagesize = val;
this.pageList();
},
//
handleCurrentChange(val) {
this.queryInfo.currentPage = val;
this.pageList();
},
//
resetform() {
this.$refs.form.resetFields();
this.dialogVisible = false;
this.form.userName = "";
this.form.phoneNumber = "";
this.form.name = "";
this.form.email = "";
this.form.roleNames = [];
this.form.password = "";
this.form.surname = "";
this.form.IsActive = "";
this.$refs.multipleTable.clearSelection();
},
handleCreate() {
this.formTitle = "创建用户";
this.dialogVisible = true;
this.isEdit = false;
this.form.phoneNumber = this.getRandomPhoneNumber()
this.form.email = this.getRandomEmail()
usersroles().then((res) => {
this.options = res.items
})
}, },
//
Createview() {
this.queryInfo.currentPage = 1;
this.queryInfo.Sorting = "";
this.$refs.normalSearch_UserManage.searchNormalClear()//
usersroles().then((res) => {
this.options = res.items;
});
this.$refs.multipleTable.clearSort();
},
//
usersID(data) {
getusersID(data).then((res) => {
const data = res.items;
this.form.roleNames = data.map((item) => {
return item.name;
});
});
},
//
Update(row) {
if (row) {
this.formTitle = "编辑用户";
this.usersId = row.id;
this.usersID(row.id);
this.form.userName = row.userName;
this.form.phoneNumber = row.phoneNumber;
this.form.name = row.name;
this.form.email = row.email;
this.form.surname = row.name;
this.form.lockoutEnabled = row.lockoutEnabled
this.concurrencyStamp = row.concurrencyStamp;
this.form.IsActive = row.isActive;
usersroles().then((res) => {
this.options = res.items;
});
this.isEdit = true;
this.dialogVisible = true;
}
},
//
submitForm() {
this.$refs.form.validate((valid) => {
//
if (valid && !this.isEdit) {
this.form.surname = this.form.name;
postCreateUser(this.form)
.then((res) => {
this.resetform();
this.$successMsg("创建成功!");
this.pageList();
})
.catch((err) => {
this.resetform();
});
} else if (valid && this.isEdit) {
//
const data = JSON.parse(JSON.stringify(this.form));
delete data.password;
data.concurrencyStamp = this.concurrencyStamp;
postUpdateUser(data, this.usersId)
.then((res) => {
this.$successMsg("编辑成功!");
this.pageList();
this.resetform();
})
.catch((err) => {
this.resetform();
});
} else {
this.$errorMsg("请按照提示继续输入!");
return false;
}
});
},
//
deleteUser(row){
this.$confirm("您确认删除 " + row.userName + " 用户吗?", "提示", {
confirmButtonText: "确认删除用户",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true
postDeleteUser(row.id)
.then((res) => {
this.loading = false
this.$successMsg("删除成功!");
this.pageList();
})
.catch((err) => {
this.loading = false
})
})
.catch((err) => {
console.log(err)
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
//table
handleRowClick(row, column, event) {
if (
this.multipleSelection.length == 1 &&
this.multipleSelection[0].id == row.id
) {
this.$refs.multipleTable.clearSelection();
return;
}
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
// 11
getRandomPhoneNumber () {
return '1' + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1)
},
getRandomEmail () {
return '' + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + '@' + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + Math.floor(Math.random()*9+1) + '.com'
},
},
}; };
</script> </script>
<style lang="scss" scoped>
.appMainPage {
.main {
.table-active {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
padding: 20px 0;
.bttton-box {
display: flex;
}
}
}
.el-table__body-wrapper {
tbody {
span {
cursor: pointer;
&:hover {
color: #409eff;
}
}
}
}
.Footer {
padding: 25px;
// background-color: #f2f2f2;
display: flex;
justify-content: flex-end;
::v-deep button {
background-color: #fff;
}
}
::v-deep .el-dialog {
.el-dialog__header {
button {
display: none;
}
}
}
.el-form-item{
margin-bottom: 30px;
}
.show-pwd {
position: absolute;
right: 10px;
}
}
</style>

22
PC/InterFace.Dash/src/views/menuList/ExportCustomUserSetting.vue

@ -24,7 +24,10 @@
:primarySearchOption="primarySearchOption" :primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick" @overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_right="buttonOperationList_rightBase" :buttonOperationList_right="(row)=>{return buttonOperationList_rightBase(
{permission:['Z.ExportCustomUserSetting.Update'],hide:OperaButtonHide(row)},
{permission:['Z.ExportCustomUserSetting.Delete'],hide:OperaButtonHide(row)}
)}"
@buttonOperationClick_right="buttonOperationClick_right" @buttonOperationClick_right="buttonOperationClick_right"
> >
<!-- :buttonOperationList_left="buttonOperationClick_leftBase" <!-- :buttonOperationList_left="buttonOperationClick_leftBase"
@ -261,7 +264,8 @@ export default {
}, },
getColumList(){ getColumList(){
let val = this.formReveal ? this.CreateFormData.exportTableName_old : this.editFormData.exportTableName_old let val = this.formReveal ? this.CreateFormData.exportTableName_old : this.editFormData.exportTableName_old
getPageList(this.PageListParams, val+'/base').then(res=>{ getPageList(this.PageListParams, val+'/base')
.then(res=>{
let _column = res.items[0] let _column = res.items[0]
this.columsList = [] this.columsList = []
for(let item in _column){ for(let item in _column){
@ -279,6 +283,17 @@ export default {
this.editForm[2].userOptions = this.columsList this.editForm[2].userOptions = this.columsList
} }
}) })
.catch(err=>{
let _name = ''
if(this.formReveal){
this.CreateForm[2].userOptions = []
_name = this.CreateFormData.exportTableName
}else{
this.editForm[2].userOptions = []
_name = this.editFormData.exportTableName
}
this.$message.error(`暂无【${_name}】模块权限`)
})
}, },
// //
FormSubmit(val) { FormSubmit(val) {
@ -316,6 +331,9 @@ export default {
}) })
} }
}, },
OperaButtonHide(data){
return data.creatorId != this.$store.getters.currentUserInfo.id
}
} }
}; };
</script> </script>

Loading…
Cancel
Save