Commit ec941dda authored by 黄奎's avatar 黄奎

111

parent b6948ff0
...@@ -7,13 +7,16 @@ ...@@ -7,13 +7,16 @@
<ul> <ul>
<li> <li>
<!-- 岗位名称 --> <!-- 岗位名称 -->
<span><em>{{$t('adm.adm_gwname')}}</em><el-input class='w210' v-model='msg.PostName' <span><em>{{$t('adm.adm_gwname')}}</em>
@keyup.enter.native="getList"></el-input></span> <el-input class='w210' v-model='msg.PostName' @keyup.enter.native="getList"></el-input>
</span>
</li> </li>
<li> <li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()"/> <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
<input type="button" @click="outerVisible = true,dialogTitle=$t('objFill.xingzenganwei'),layerShowIndex=1,getCompany()" @click="resetPageIndex(),getList()" />
class="normalBtn" :value="$t('pub.addBtn')"/> <input type="button"
@click="outerVisible = true,dialogTitle=$t('objFill.xingzenganwei'),layerShowIndex=1,getCompany()"
class="normalBtn" :value="$t('pub.addBtn')" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -37,7 +40,8 @@ ...@@ -37,7 +40,8 @@
<el-button @click="roleAllocation(item.PostId,1)" type="primary" icon="iconfont icon-user11"></el-button> <el-button @click="roleAllocation(item.PostId,1)" type="primary" icon="iconfont icon-user11"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('objFill.appjuesegl')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('objFill.appjuesegl')" placement="top-start">
<el-button v-if="qjGroupId==userInfo.RB_Group_id || A_AppMenu_Allot" @click="roleAllocation(item.PostId,2)" type="primary" icon="iconfont icon-user11"></el-button> <el-button v-if="qjGroupId==userInfo.RB_Group_id || A_AppMenu_Allot"
@click="roleAllocation(item.PostId,2)" type="primary" icon="iconfont icon-user11"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button @click="deleteData(item.PostId)" type="danger" icon="el-icon-delete"></el-button> <el-button @click="deleteData(item.PostId)" type="danger" icon="el-icon-delete"></el-button>
...@@ -47,14 +51,15 @@ ...@@ -47,14 +51,15 @@
</tr> </tr>
</table> </table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination> </el-pagination>
<el-dialog custom-class='w550' :title="dialogTitle" :visible.sync="outerVisible" center <el-dialog custom-class='w550' :title="dialogTitle" :visible.sync="outerVisible" center
:before-close="closeChangeMachie"> :before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<div v-if="this.layerShowIndex==1"> <div v-if="this.layerShowIndex==1">
<el-form-item :label="$t('adm.adm_gwname')" prop="PostName"> <el-form-item :label="$t('adm.adm_gwname')" prop="PostName">
<el-input class='w300' type="text" v-model="addMsg.PostName" :placeholder="$t('pub.pleaseImport')"></el-input> <el-input class='w300' type="text" v-model="addMsg.PostName" :placeholder="$t('pub.pleaseImport')">
</el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('adm.adm_ynyyfenqu')" prop="IsUseSubarea"> <el-form-item :label="$t('adm.adm_ynyyfenqu')" prop="IsUseSubarea">
<el-select v-model="addMsg.IsUseSubarea" :placeholder="$t('pub.pleaseSel')"> <el-select v-model="addMsg.IsUseSubarea" :placeholder="$t('pub.pleaseSel')">
...@@ -64,16 +69,19 @@ ...@@ -64,16 +69,19 @@
</el-form-item> </el-form-item>
</div> </div>
<div v-if="this.layerShowIndex==2"> <div v-if="this.layerShowIndex==2">
<el-transfer filterable v-model="postRoleListId" :data="groupRoleList" :props="{key: 'Id',label: 'Name'}" :titles="[$t('objFill.kexuanjuese'), $t('objFill.yiuxanjuese')]"></el-transfer> <el-transfer filterable v-model="postRoleListId" :data="groupRoleList" :props="{key: 'Id',label: 'Name'}"
:titles="[$t('objFill.kexuanjuese'), $t('objFill.yiuxanjuese')]"></el-transfer>
</div> </div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> &nbsp; <button class="hollowFixedBtn"
<button v-if="this.layerShowIndex==1" class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> &nbsp;
<button v-if="this.layerShowIndex==2" class="normalBtn" type="primary" @click="updateRole()">{{$t('pub.saveBtn')}}</button> <button v-if="this.layerShowIndex==1" class="normalBtn" type="primary"
@click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
<button v-if="this.layerShowIndex==2" class="normalBtn" type="primary"
@click="updateRole()">{{$t('pub.saveBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -81,10 +89,9 @@ ...@@ -81,10 +89,9 @@
export default { export default {
data() { //穿梭 data() { //穿梭
return { return {
A_AppMenu_Allot:false, A_AppMenu_Allot: false,
qjGroupId:-1, qjGroupId: -1,
userInfo:{}, userInfo: {},
loading: true, loading: true,
total: 0, total: 0,
pageSize: '', pageSize: '',
...@@ -111,8 +118,16 @@ ...@@ -111,8 +118,16 @@
Status: 0, Status: 0,
}, },
rules: { rules: {
PostName: [{required: true,message: this.$t('adm.adm_qsrgwname'),trigger: 'blur'}], PostName: [{
IsUseSubarea: [{required: true,message: this.$t('adm.adm_qxzsfyyfenqu'),trigger: 'blur'}] required: true,
message: this.$t('adm.adm_qsrgwname'),
trigger: 'blur'
}],
IsUseSubarea: [{
required: true,
message: this.$t('adm.adm_qxzsfyyfenqu'),
trigger: 'blur'
}]
}, },
addMsg: { addMsg: {
PostId: '-1', PostId: '-1',
...@@ -146,25 +161,24 @@ ...@@ -146,25 +161,24 @@
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
this.GetSupperOrderEditAuth(); this.GetSupperOrderEditAuth();
this.qjGroupId=this.QjGroupId(); this.qjGroupId = this.QjGroupId();
this.msg.RB_Group_Id = this.getDepartmentMsg.RB_Group_Id = this.getCompanyMsg.RB_Group_Id = this.addMsg.RB_Group_Id = userInfo.RB_Group_id; //集团 this.msg.RB_Group_Id = this.getDepartmentMsg.RB_Group_Id = this.getCompanyMsg.RB_Group_Id = this.addMsg
.RB_Group_Id = userInfo.RB_Group_id; //集团
this.getList(); this.getList();
this.getCompany(); this.getCompany();
this.getDerpartMent(); this.getDerpartMent();
}, },
methods: { methods: {
GetSupperOrderEditAuth() { GetSupperOrderEditAuth() {
var actionCodeNew = this.$AuthCode.A_AppMenu_Allot; var actionCodeNew = this.$AuthCode.A_AppMenu_Allot;
// 制单权限
// 制单权限 this.CheckUserAuth(actionCodeNew, res => {
this.CheckUserAuth(actionCodeNew, res => { if (res.data.resultCode == 1 && res.data.data == 1) {
if (res.data.resultCode == 1 && res.data.data == 1) { this.A_AppMenu_Allot = true;
this.A_AppMenu_Allot = true; }
} });
}); },
},
getCompany() { getCompany() {
this.apipost('admin_get_BranchGetList', this.getCompanyMsg, res => { this.apipost('admin_get_BranchGetList', this.getCompanyMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -173,10 +187,8 @@ ...@@ -173,10 +187,8 @@
} else { } else {
this.companyList = res.data.data; this.companyList = res.data.data;
} }
} else { } else {}
} }, err => {})
}, err => {
})
}, },
getDerpartMent() { //获取部门 getDerpartMent() { //获取部门
this.apipost('admin_get_DepartmentGetList', this.getDepartmentMsg, res => { this.apipost('admin_get_DepartmentGetList', this.getDepartmentMsg, res => {
...@@ -186,10 +198,8 @@ ...@@ -186,10 +198,8 @@
} else { } else {
this.departMentList = res.data.data; this.departMentList = res.data.data;
} }
} else { } else {}
} }, err => {})
}, err => {
})
}, },
getList() { //获取数据 getList() { //获取数据
this.loading = true, this.loading = true,
...@@ -198,10 +208,8 @@ ...@@ -198,10 +208,8 @@
this.DataList = res.data.data.pageData this.DataList = res.data.data.pageData
this.total = res.data.data.count this.total = res.data.data.count
this.loading = false this.loading = false
} else { } else {}
} }, err => {})
}, err => {
})
}, },
addData() { //新增数据 addData() { //新增数据
this.apipost('admin_post_PostSet', this.addMsg, res => { this.apipost('admin_post_PostSet', this.addMsg, res => {
...@@ -213,21 +221,19 @@ ...@@ -213,21 +221,19 @@
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
}, err => { }, err => {})
})
}, },
updateData(index, id) { updateData(index, id) {
this.addMsg.PostId = id this.addMsg.PostId = id
this.apipost('admin_get_PostGet', {PostId: id}, res => { this.apipost('admin_get_PostGet', {
PostId: id
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data this.addMsg = res.data.data;
this.addMsg.IsUseSubarea = this.addMsg.IsUseSubarea.toString(); this.addMsg.IsUseSubarea = this.addMsg.IsUseSubarea.toString();
} else { }
} }, err => {})
}, err => {
})
this.layerShowIndex = 1; this.layerShowIndex = 1;
}, },
roleAllocation(id, platform) { //角色管理 roleAllocation(id, platform) { //角色管理
this.platform = platform; this.platform = platform;
...@@ -237,23 +243,24 @@ ...@@ -237,23 +243,24 @@
this.updatePostId = id; this.updatePostId = id;
this.layerShowIndex = 2; this.layerShowIndex = 2;
this.outerVisible = true; this.outerVisible = true;
this.apipost('admin_get_PostGetPostRole', {PostId: id, Platform: platform}, res => { this.apipost('admin_get_PostGetPostRole', {
PostId: id,
Platform: platform
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.groupRoleList = res.data.data.groupRoleList; this.groupRoleList = res.data.data.groupRoleList;
res.data.data.postRoleList.forEach(i => { res.data.data.postRoleList.forEach(i => {
this.postRoleListId.push(i.Id) this.postRoleListId.push(i.Id)
}); });
} else {
} }
}, err => { }, err => {})
})
}, },
updateRole() { //修改岗位角色 updateRole() { //修改岗位角色
let roleIdsString = this.postRoleListId.join(','); let roleIdsString = this.postRoleListId.join(',');
this.apipost('admin_post_PostUpdatePostRole', { this.apipost('admin_post_PostUpdatePostRole', {
PostId: this.updatePostId, PostId: this.updatePostId,
RoleIds: roleIdsString, RoleIds: roleIdsString,
Platform:this.platform Platform: this.platform
}, res => { }, res => {
this.insideDialogTxt = res.data.message this.insideDialogTxt = res.data.message
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -262,8 +269,7 @@ ...@@ -262,8 +269,7 @@
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
}, err => { }, err => {})
})
}, },
deleteData(id) { deleteData(id) {
this.$confirm(this.$t('tips.shifoushanchu'), this.$t('tips.tips'), { this.$confirm(this.$t('tips.shifoushanchu'), this.$t('tips.tips'), {
...@@ -280,17 +286,14 @@ ...@@ -280,17 +286,14 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getList() this.getList()
} else { } else {}
} }, err => {})
}, err => {
})
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: this.$t('tips.cancleDelete') message: this.$t('tips.cancleDelete')
}); });
}); });
}, },
linkageDepartment() { //联动部门 linkageDepartment() { //联动部门
this.msg.RB_Department_Id = '0'; this.msg.RB_Department_Id = '0';
...@@ -329,4 +332,4 @@ ...@@ -329,4 +332,4 @@
} }
} }
} }
</script> </script>
\ No newline at end of file
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