Commit 9ad7d864 by fukai

更新admin

parent c47e213b
......@@ -213,7 +213,7 @@
</c-col>
<c-col :span="20">
<el-form-item :label="$t('statics.所属全辖机构')" :label-width="formLabelWidth" prop="qxbranch">
<el-form-item :label="$t('statics.所属全辖机构')" :label-width="formLabelWidth" prop="qxbranch" :rules="[{required: dataForm.branch != dataForm.upbranch, message: this.$t('components.必输项') }]">
<c-input v-model="dataForm.qxbranch" autocomplete="off" placeholder="" >
</c-input>
</el-form-item>
......
......@@ -177,7 +177,7 @@ export const Pattern = {
{ "max": 62, "message": "最大长度62个字符", "trigger": "blur" }
],
"qxbranch": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
......
......@@ -140,6 +140,13 @@
</c-input>
</el-form-item>
</c-col>
<c-col :span="20">
<el-form-item :label="$t('statics.备注')">
<c-input :value="$t('statics.已启用此行')">
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" style="padding-right: 20px;">
......@@ -215,7 +222,7 @@
</c-col>
<c-col :span="20">
<el-form-item :label="$t('statics.所属全辖机构')" prop="qxbranch">
<el-form-item :label="$t('statics.所属全辖机构')" prop="qxbranch" :rules="[{required: bchInfo.branch != bchInfo.upbranch, message: this.$t('components.必输项') }]">
<c-input v-model="bchInfo.qxbranch" autocomplete="off" >
</c-input>
</el-form-item>
......@@ -291,7 +298,7 @@ export default {
orgTree: [],
defaultProps: {
children: 'children',
label: 'bchname'
label: this.$i18n.locale === 'zh' ? 'bchname':'namen',
},
bchInfo: new BchModel().data.bchInfo,
......
......@@ -28,7 +28,7 @@
<span class="top">
<!-- <el-tooltip effect="light" content="" placement="bottom"> -->
<span class="el-tree-node__label">
{{ node.label }}
{{ $t('menu.'+node.label )}}
</span>
<!-- </el-tooltip> -->
<span>
......@@ -74,7 +74,8 @@
<c-col :span="24">
<el-form-item :label="$t('statics.菜单名称')" prop="name">
<c-input v-model="menuInfo.name"> </c-input>
<c-input v-model="menuInfo.name" v-if="$i18n.locale == 'zh'"></c-input>
<c-input v-if="$i18n.locale == 'en'" :value="$t('menu.'+this.menuInfo.name)"></c-input>
</el-form-item>
</c-col>
......
......@@ -30,8 +30,34 @@
</c-col>
<c-col :span="24">
<c-paging-table :data="roleData" :columns="roleColumns" :pageNumber="model.pageNum" :pageSize="model.pageSize"
<c-paging-table :data="roleData" :pageNumber="model.pageNum" :pageSize="model.pageSize"
:total="model.total" v-on:queryFunc="queryFunc" :border="true" @sort-change="sortChange" sortable="custom">
<el-table-column prop="cod" :label="$t('statics.角色代码')" width="auto">
</el-table-column>
<el-table-column v-if="$i18n.locale == 'zh'" prop="name" :label="$t('statics.角色名称')" width="auto">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column v-else-if="$i18n.locale == 'en'" prop="extfield1" :label="$t('statics.角色名称')" width="auto">
<template slot-scope="scope">
{{ scope.row.extfield1}}
</template>
</el-table-column>
<el-table-column v-if="$i18n.locale == 'zh'" prop="description" :label="$t('statics.角色描述')" width="auto">
<template slot-scope="scope">
{{ scope.row.description }}
</template>
</el-table-column>
<el-table-column v-else-if="$i18n.locale == 'en'" prop="extfield2" :label="$t('statics.角色描述')" width="auto">
<template slot-scope="scope">
{{ scope.row.extfield2}}
</template>
</el-table-column>
<el-table-column prop="bchlev" :label="$t('statics.适用范围')" width="auto">
</el-table-column>
<el-table-column prop="state" :label="$t('statics.角色状态')" width="auto">
</el-table-column>
<c-table-column fixed="right" prop="op" :label="$t('statics.操作')" width="280px">
<template slot-scope="{ scope }">
<c-button style="margin-left: 5px" size="small" type="" ref="roleDisplayBtn" @click="roleInfo(scope.row)">
......@@ -81,7 +107,7 @@
<c-col :span="20">
<el-form-item :label="$t('statics.扩展信息2')" :label-width="formLabelWidth" prop="extfield2">
<el-form-item :label="$t('statics.角色描述EN')" :label-width="formLabelWidth" prop="extfield2">
<c-input v-model="dataForm.extfield2" autocomplete="off">
</c-input>
</el-form-item>
......@@ -113,7 +139,7 @@
<c-col :span="20">
<el-form-item :label="$t('statics.扩展信息1')" :label-width="formLabelWidth" prop="extfield2">
<el-form-item :label="$t('statics.角色名称EN')" :label-width="formLabelWidth" prop="extfield2">
<c-input v-model="dataForm.extfield1" autocomplete="off">
</c-input>
</el-form-item>
......@@ -150,7 +176,11 @@
<c-col :span="24">
<el-form-item :label="$t('statics.角色名称')" :label-width="formLabelWidth" prop="name">
<c-input v-model="menuForm.name" autocomplete="off" :disabled="true">
<c-input v-if="$i18n.locale == 'zh'" v-model="menuForm.name" autocomplete="off" :disabled="true">
{{$t('statics.'+name)}}
</c-input>
<c-input v-if="$i18n.locale == 'en'" v-model="menuForm.extfield1" autocomplete="off" :disabled="true">
{{extfield1}}
</c-input>
</el-form-item>
</c-col>
......@@ -179,8 +209,11 @@
:props="treeData.defaultProps"
:filter-node-method="filterNode"
@check-change="handleCheckChange"
/>
>
<span slot-scope="{ node }">
{{ $t('menu.'+node.label )}}
</span>
</el-tree>
</div>
</c-row>
......@@ -217,33 +250,33 @@
model: new Role().data,
roleData: [],
roleColumns: [{
label: '角色代码',
prop: 'cod',
width: 'auto'
},
{
label: '角色名称',
prop: 'name',
width: 'auto'
},
{
label: '角色描述',
prop: 'description',
width: 'auto'
},
{
label: '适用范围',
prop: 'bchlev',
width: 'auto'
},
{
label: '角色状态',
prop: 'state',
width: 'auto'
},
// roleColumns: [{
// label: '角色代码',
// prop: 'cod',
// width: 'auto'
// },
// {
// label: '角色名称',
// prop: 'name',
// width: 'auto'
// },
// {
// label: '角色描述',
// prop: 'description',
// width: 'auto'
// },
// {
// label: '适用范围',
// prop: 'bchlev',
// width: 'auto'
// },
// {
// label: '角色状态',
// prop: 'state',
// width: 'auto'
// },
],
// ],
dataForm: new Role().data,
menuForm: new Role().data,
......
......@@ -286,17 +286,17 @@
Api.post('/webapi/admin/sysparam/addSysparm',this.dataForm)
.then((res) => {
if (res.respCode == "AAAAAA" || res.respCode == "AAAAAA") {
this.$notify.success("添加成功!");
this.$notify.success(this.$t('statics.添加成功!'));
this.dialogFlg = false;
this.onDblparamSearch();
} else {
this.$notify.error("添加失败!");
this.$notify.error(this.$t('statics.添加失败!'));
}
})
.catch((err) => {
this.$notify.error("添加失败!");
this.$notify.error(this.$t('statics.添加失败!'));
});
} else {
this.$notify.error({
......
<template>
<div style="height:100%;padding:3px 8px;overflow: auto;">
<!--通讯,1-->
<div id="userData">
</div>
<!--通讯,1-->
<!--通讯,2-->
<div id="delUser">
</div>
<!--通讯,2-->
<!--通讯,3-->
<div id="status">
</div>
<!--通讯,3-->
<div v-show="hideChild">
<!--卡片,1-->
<div v-show="hideChild" style="height: 100%;">
<el-card shadow="always">
<!--表单,1-->
<el-form ref="userSearch" tokenKey="userSearch" label-width="200px">
<!--布局,1-->
<el-row ref="a1">
<!--col,1-->
<el-col :span="11" :xs="10" :sm="10" :md="11" :lg="11" :xl="11">
<!--表单行,1-->
<el-form-item :label="$t('statics.姓名:')" prop="name">
<!--输入框,1-->
<el-input event-render="loadText" v-model.trim="name" type="text" :disabled="false">
</el-input>
<!--输入框,1-->
</el-form-item>
<!--表单行,1-->
</el-col>
<!--col,1-->
<!--col,2-->
<el-col :span="11" :xs="10" :sm="10" :md="11" :lg="11" :xl="11">
<!--表单行,2-->
<el-form-item :label="$t('statics.登录名:')" prop="logname">
<!--输入框,2-->
<el-input event-render="loadText" v-model.trim="logname" type="text"
:disabled="false">
</el-input>
<!--输入框,2-->
</el-form-item>
<!--表单行,2-->
</el-col>
<!--col,2-->
</el-row>
<!--布局,1-->
<!--布局,2-->
<c-row ref="a2">
<!--col,3-->
<c-col :span="24">
<span style="float: left">
<el-button size="small" :loading="false" ref="addUser" type="primary" v-if="btnA"
......@@ -63,53 +38,39 @@
</el-button>
</span>
</c-col>
<!--col,4-->
</c-row>
<!--布局,2-->
</el-form>
<!--表单,1-->
</el-card>
<!--卡片,1-->
<!--卡片,2-->
<el-card shadow="always">
<div style="height: 100%;">
<el-table
ref="userTable"
:border="true"
:data="userdata"
style="width:100%;"
size="small"
height="calc(100% - 52px)"
:highlight-current-row="true"
@selection-change="handleSelectionChange"
>
<!--分页表格,1-->
<c-paging-table event-render="pagingTable" ref="userTable" :data="userdata" stripe border :pagination="true"
<!-- <c-paging-table event-render="pagingTable" ref="userTable" :data="userdata" stripe border :pagination="true"
paging-side="server" :limit-default="10" :pager-count="7" :page-sizes="[10, 20, 30, 40, 50, 100]" :background="true"
highlight-current-row :need-loading="false">
<!--分页表格列,1-->
highlight-current-row :need-loading="false" :total="Number(pagination.total)"
:page-size="pagination.pageSize"
:current-page="pagination.pageNum"> -->
<el-table-column :filter-multiple="true" type="index" align="center">
</el-table-column>
<!--分页表格列,1-->
<!--分页表格列,2-->
<el-table-column :filter-multiple="true" label="ID" prop="id" align="center">
</el-table-column>
<!--分页表格列,2-->
<!--分页表格列,3-->
<el-table-column :filter-multiple="true" :label="$t('statics.姓名')" prop="nam" align="center">
</el-table-column>
<!--分页表格列,3-->
<!--分页表格列,4-->
<el-table-column :filter-multiple="true" :label="$t('statics.登录名称')" prop="extkey" align="center">
</el-table-column>
<!--分页表格列,4-->
<!--分页表格列,5-->
<!-- <el-table-column :filter-multiple="true" :label="$t('statics.性别')" prop="sex" :formatter="sexformatter"-->
<!-- align="center">-->
<!-- </el-table-column>-->
<!--分页表格列,5-->
<!--分页表格列,6-->
<el-table-column :filter-multiple="true" :label="$t('statics.状态')" prop="secsta" :formatter="stateformatter" align="center">
</el-table-column>
<!--分页表格列,6-->
<!--分页表格列,7-->
<el-table-column :filter-multiple="true" prop="state" align="center" :label="$t('buttons.操作')">
<template slot-scope="scope">
<c-button style="margin-left: 5px" size="small" type="" @click="handleInfo(scope.row)">{{ $t('buttons.详情')
......@@ -122,11 +83,18 @@
@click="handleDelete(scope.row)">{{ $t('buttons.删除') }}</c-button>
</template>
</el-table-column>
<!--分页表格列,7-->
</c-paging-table>
<!--分页表格,1-->
</el-card>
<!--卡片,2-->
<!-- </c-paging-table> -->
</el-table>
<el-pagination
layout="total, sizes, prev, pager, next, jumper"
:page-sizes="[5, 10, 20, 50, 100]"
:total="Number(pagination.total)"
:page-size="pagination.pageSize"
:current-page="pagination.pageNum"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" >
</el-pagination>
</div>
</div>
<!--routerView,1-->
<router-view v-if="$store.state.common.refreshRoute">
......@@ -141,7 +109,7 @@ import commonFunctions from "@/mixin/commonFunctions.js";
import Api from "@/service/Api";
import { userData } from "@/service/tempdata/userData";
export default {
name: "userSearch",
name: "userManage",
computed: {
userData() {
return userData
......@@ -157,6 +125,12 @@ export default {
btnA: true,
btnB: true,
hideChild: true,
mulSelected: [],
pagination: {
pageNum: 1,
pageSize: 10,
total: 0
},
}
},
components: {
......@@ -177,6 +151,10 @@ export default {
// this.getHiddenButtonVue();
// }
},
activated() {
this.$refs.userTable.clearSelection();
this.searchUser();
},
methods: {
getHiddenButtonVue() {
const loading = this.loading();
......@@ -238,19 +216,30 @@ export default {
let params = {
extkey: this.logname,
nam: this.name,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize
};
const loading = this.loading();
let res = await Api.post('/webapi/admin/usr/listusr', params);
if (res.respCode == SUCCESS) {
loading.close();
this.userdata = res.data;
this.userdata = res.data.list || [];
this.pagination = {
pageNum: res.data.pageNum || 1,
pageSize: res.data.pageSize || 10,
total: res.data.total ? Number(res.data.total) : 0
};
}
},
handleAddBtn() {
this.$router.push({ name: 'userAdd' });
},
handleEdit(row) {
this.$router.push({ name: 'userAdd', query: { id: row.id } });
//this.$router.push({ name: 'userAdd', query: { id: row.id } });
this.routerPush({
path:"/iscOrganization/userManage/userAdd",
query: { id: row.id }
})
},
handleInfo(row) {
this.$router.push({ name: 'userInfo', query: { id: row.id, btnType: "info" } });
......@@ -275,7 +264,20 @@ export default {
restUser() {
this.logname = "";
this.name = "";
}
},
handleSelectionChange(val) {
this.mulSelected = val
},
// pageSize改变
handleSizeChange(val) {
this.pagination.pageNum = 1;
this.pagination.pageSize = val;
this.searchUser();
},
handleCurrentChange(val){
this.pagination.pageNum = val
this.searchUser()
}
}
}
</script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -71,10 +71,11 @@
<el-option
v-for="item in branchlist"
:key="item.branch"
:label="item.branch+'-'+item.bchname"
:label="$i18n.locale === 'zh' ? item.branch +' - '+ item.bchname : item.branch +' - '+ item.namen"
:value="item.branch"
>
<span >{{ item.branch +' - ' + item.bchname }}</span>
<span style="float: left" v-if="$i18n.locale === 'zh'">{{ item.branch }} - {{ item.bchname }}</span>
<span style="float: left" v-if="$i18n.locale === 'en'">{{ item.branch }} - {{ item.namen }}</span>
</el-option>
</el-select>
</el-form-item>
......@@ -239,9 +240,10 @@
<el-option
v-for="item in branchlist"
:key="item.branch"
:label="item.branch+'-'+item.bchname"
:label="$i18n.locale == 'zh' ? item.branch +' - '+ item.bchname : item.branch +' - '+ item.namen"
:value="item.branch">
<span >{{ item.branch +' - ' + item.bchname }}</span>
<span style="float: left" v-if="$i18n.locale === 'zh'">{{ item.branch }} - {{ item.bchname }}</span>
<span style="float: left" v-if="$i18n.locale === 'en'">{{ item.branch }} - {{ item.namen }}</span>
</el-option>
</el-select>
</el-form-item>
......@@ -254,10 +256,11 @@
<el-option
v-for="item2 in rolelist"
:key="item2.id"
:label="item2.id+'-'+item2.name"
:label="$i18n.locale == 'zh' ? item2.id +' - '+ item2.name : item2.id +' - '+ item2.extfield1"
:value="item2.id"
>
<span >{{ item2.id +' - ' + item2.name }}</span>
<span style="float: left" v-if="$i18n.locale === 'zh'">{{ item2.id }} - {{ item2.name }}</span>
<span style="float: left" v-if="$i18n.locale === 'en'">{{ item2.id }} - {{ item2.extfield1 }}</span>
</el-option>
</el-select>
</el-form-item>
......@@ -565,14 +568,14 @@ this.role_init();
let bchList=responseData.data.branchList;
let tmpList=[]
bchList.forEach((item) => {
tmpList.push(item.branch);
tmpList.push(item.BRANCH);
});
$this.user.branchcode=tmpList;
let roleList=responseData.data.roleList;
let tmpList2=[]
roleList.forEach((item2) => {
tmpList2.push(item2.roleid);
tmpList2.push(item2.ROLEID);
});
$this.user.rolecode=tmpList2;
$this.user.id= responseData.data.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment