Browse Source

2022.9.30

main
renguanyu111 3 years ago
parent
commit
7659d0d327
  1. 48
      src/api/duty/gwDingXing.js
  2. 59
      src/api/duty/quanXian.js
  3. 4
      src/router/index.js
  4. 122
      src/views/assessmentProgram/gwDepartmentalAssessment.vue
  5. 39
      src/views/assessmentProgram/gwQualitativeIndicators.vue
  6. 4
      src/views/basicInfo/gwProject.vue
  7. 1247
      src/views/basicInfo/gwTarget.vue
  8. 210
      src/views/basicInfo/project.vue
  9. 4
      src/views/basicInfo/projectBase.vue
  10. 8
      src/views/basicInfo/target.vue
  11. 465
      src/views/basicInfo/targetBase.vue
  12. 47
      src/views/permission/permissionSetting.vue
  13. 335
      src/views/permission/xiTong.vue

48
src/api/duty/gwDingXing.js

@ -95,4 +95,52 @@ export function editdeatilscont(data) {
data
})
}
// 编辑岗位子栏目内容
export function edit_son_target_cont(data) {
return request({
url: '/postpc/edit_son_target_cont',
method: 'post',
data
})
}
// 岗位定量考核目标列表
export function post_config_list(data) {
return request({
url: '/postpc/post_config_list',
method: 'post',
data
})
}
// 提交定量考核数据
export function set_evaluation_objectives(data) {
return request({
url: '/postpc/set_evaluation_objectives',
method: 'post',
data
})
}
// 修改考核目标设置
export function eite_quantitative_config(data) {
return request({
url: '/postpc/eite_quantitative_config',
method: 'post',
data
})
}
// 删除考核目标设置
export function del_quantitative_config(data) {
return request({
url: '/postpc/del_quantitative_config',
method: 'post',
data
})
}
// 查看定量考核目标设定
export function lookposttiveconfig(data) {
return request({
url: '/postpc/lookposttiveconfig',
method: 'post',
data
})
}

59
src/api/duty/quanXian.js

@ -0,0 +1,59 @@
import request from '@/utils/requestFile'
// 添加应用系统
export function add_system(data) {
return request({
url: '/powerpc/add_system',
method: 'post',
data
})
}
// 系统列表
export function system_list(data) {
return request({
url: '/powerpc/system_list',
method: 'post',
data
})
}
// 编辑应用系统信息
export function edit_system(data) {
return request({
url: '/powerpc/edit_system',
method: 'post',
data
})
}
// 更改状态或删除
export function edit_state_of_del(data) {
return request({
url: '/powerpc/edit_state_of_del',
method: 'post',
data
})
}
// 系统菜单
export function system_about_menu(data) {
return request({
url: '/powerpc/system_about_menu',
method: 'post',
data
})
}
// 系统授权-权限列表
export function obtain_authorization(data) {
return request({
url: '/system_authorizing/obtain_authorization',
method: 'post',
data
})
}
// 编辑权限
export function edit_power(data) {
return request({
url: 'powerpc/edit_power',
method: 'post',
data
})
}

4
src/router/index.js

@ -255,7 +255,7 @@ export const constantRoutes = [
},
{
path: 'Target',
component: () => import('@/views/basicInfo/target'),
component: () => import('@/views/basicInfo/targetBase'),
meta: { title: '考核目标'}
},
],
@ -391,7 +391,7 @@ export const constantRoutes = [
{
path: 'Target',
name: 'Target',
component: () => import('@/views/basicInfo/target'),
component: () => import('@/views/basicInfo/targetBase'),
meta: { title: '考核目标', icon: 'tree' }
},
// {

122
src/views/assessmentProgram/gwDepartmentalAssessment.vue

@ -360,7 +360,7 @@
</el-table-column>
</el-table>
</el-card>
<!-- <el-form-item label="拉取部门考核">
<el-form-item label="拉取部门考核">
<el-select v-model="laTrue" placeholder="请选择" @change="laBian">
<el-option
v-for="item in yesList"
@ -369,7 +369,67 @@
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
</el-form-item>
<el-card v-show="laTrue==1" class="box-card" v-for="(item,index) in weiDuList1" :key="item.id">
<el-row>
<el-col :span="8">
<span>考核纬度{{item.name}}</span>
</el-col>
<el-col :span="8">
</el-col>
<el-col :span="8">
指标合计分{{item.zhiFraction}}
</el-col>
</el-row>
<el-table
border
:data="item.child"
style="width: 100%">
<el-table-column
label="指标名称"
align="center"
prop="name"
>
</el-table-column>
<el-table-column
label="说明"
align="center"
prop="illustrate"
>
<template slot-scope="scope">
<el-input v-model="scope.row.content" autocomplete="off" />
<!-- <div v-if="scope.row.targetweight!=0">{{scope.row.targetweight}}</div> -->
</template>
</el-table-column>
<el-table-column
label="指标权重"
align="center"
prop="referencescore"
>
<template slot-scope="scope">
<el-input v-model.number="scope.row.standardscore" autocomplete="off" @input="zhibiaofenLa" />
<!-- <el-input v-if="scope.row.istrue==1" v-model.number="scope.row.referencescore" autocomplete="off" @change="zhibiaofen" /> -->
<!-- <div v-if="scope.row.istrue==2">{{scope.row.referencescore}}</div> -->
</template>
</el-table-column>
<el-table-column
label="状态"
align="center"
prop="status"
>
<template slot-scope="scope">
<el-select v-model="scope.row.status" clearable placeholder="请选择" @change="zhibiaostatusLa(scope.row)">
<el-option :value=1 label="使用">使用</el-option>
<el-option :value=2 label="禁用">禁用</el-option>
<el-option :value=3 label="观察">观察</el-option>
</el-select>
<!-- <div v-if="scope.row.targetweight!=0">{{scope.row.targetweight}}</div> -->
</template>
</el-table-column>
</el-table>
</el-card>
<!-- 部门方案拉取表格表单提交 -->
<!-- <el-card class="box-card" v-for="(item,index) in weiDuList1" :key="item.id">
<el-row>
@ -736,6 +796,7 @@
},
data() {
return {
weiDuList1:[],
laTrue:null,
yesList:[
{
@ -1034,7 +1095,9 @@
})
}
});
this.Fraction1=0
console.log("weiDuList1")
console.log(weiDuList1)
this.Fraction=0
this.weiDuList1.forEach(function(element) {
element.zhiFraction=0
});
@ -1048,9 +1111,9 @@
})
}
});
this.weiduFraction1=0
this.weiduFraction=0
this.weiDuList1.forEach(function(element) {
that.weiduFraction1+=element.zhiFraction1
that.weiduFraction+=element.zhiFraction1
});
console.log(this.weiDuList1)
}
@ -1242,6 +1305,28 @@
that.weiduFraction+=element.zhiFraction
});
},
//
zhibiaofenLa(){
const that=this
this.Fraction=0
this.weiDuList1.forEach(function(element) {
element.zhiFraction=0
});
this.weiDuList1.forEach(function(element) {
if (element.child!=null) {
element.child.forEach(function(iteam){
if(iteam.status!=2){
element.zhiFraction+=iteam.standardscore
}
})
}
});
this.weiduFraction=0
this.weiDuList1.forEach(function(element) {
that.weiduFraction+=element.zhiFraction
});
},
//
zhibiaofenCopy(){
const that=this
@ -1308,6 +1393,28 @@
that.weiduFraction+=element.zhiFraction
});
},
//
zhibiaostatusLa(row){
const that=this
this.Fraction=0
this.weiDuList1.forEach(function(element) {
element.zhiFraction=0
});
this.weiDuList1.forEach(function(element) {
if (element.child!=null) {
element.child.forEach(function(iteam){
if(iteam.status!=2){
element.zhiFraction+=iteam.referencescore
}
})
}
});
this.weiduFraction=0
this.weiDuList1.forEach(function(element) {
that.weiduFraction+=element.zhiFraction
});
},
zhuheguan(){
this.demDialogFormVisible=false
},
@ -1315,6 +1422,9 @@
async zhuheTi(){
if (this.weiduFraction==100) {
if (this.laTrue!=1) {
this.form.departmentchild=[]
}
const loading = this.$loading({
lock: true,
text: 'Loading',
@ -1324,7 +1434,7 @@
this.form.orgid=this.gwFromList.orgid.toString()
this.form.postid=this.gwFromList.gwId.toString()
this.form.postchild=this.weiDuList
this.form.departmentchild=[]
this.form.departmentchild=this.weiDuList1
// const res = await adddepartmentdutyinfo(this.form)
// const res = await newadddepartduty(this.form)
// this.demDialogFormVisible=false

39
src/views/assessmentProgram/gwQualitativeIndicators.vue

@ -1216,7 +1216,7 @@ import { editposttargetaual,addposttargetcont,targetorglist,getsuntargetinfo,eid
addpostdetacont,eidtposttardetailsstrte
} from '@/api/duty/oldGwDingXing'
import{ posttargetlist } from "@/api/duty/project";
import{ editdeatilscont,get_target_about_depart_to_post_man,add_post_target_cont,posttargetsunlist,getdetailscont } from "@/api/duty/gwDingXing";
import{ editdeatilscont,get_target_about_depart_to_post_man,add_post_target_cont,posttargetsunlist,getdetailscont,edit_son_target_cont } from "@/api/duty/gwDingXing";
import {
grouplist,
departmentlist,
@ -1436,6 +1436,8 @@ export default {
tableData:[],
//
searchInfo: {
page:1,
pagesize:10,
type:1
},
spanArr:[],
@ -1508,14 +1510,6 @@ export default {
},
deep: true
},
// gwFromList(){
// console.log("gwId")
// console.log(this.gwFromList)
// const list = []
// list.push(this.gwFromList.gwId)
// this.searchInfo.postid=list
// this.getDataList()
// },
tableData() {
this.$nextTick(() => {
this.spanArr=[],
@ -1793,11 +1787,8 @@ export default {
//
showMethod(row){
this.rowZhiData=row
console.log("this.rowZhiData")
console.log(this.rowZhiData)
this.getzhilanmuList()
this.methodShow=true
},
async onSubmitsearchfu(){
@ -1813,7 +1804,7 @@ export default {
}
// const res = await lookdutytargetinfo(methodData)
const res = await lookdutytargetinfo(this.methodData)
const res = await posttargetsunlist(this.methodData)
// this.methodData.censortype=this.methodData.censortype.map(Number)
// this.$delete(this.methodData,'censorrate')
if (res.code==0) {
@ -1831,14 +1822,14 @@ export default {
// //departmentid: this.rowZhiData.parentid, //
// dimension: this.rowZhiData.dimension, //
// targetid: this.rowZhiData.target, //
id:this.rowZhiData.id.toString()
// id:this.rowZhiData.id.toString()
departmentid: this.rowZhiData.reledepart, //
postid: this.rowZhiData.departmentspost.split(','), //
targetid: this.rowZhiData.id.toString(), //ID
}
console.log("this.methodData")
console.log(this.methodData)
const res = await posttargetsunlist(this.methodData)
if (res.code==0) {
this.methodList=res.data.list
}
},
//
@ -2277,8 +2268,13 @@ export default {
},
//
async xiuzhiming(){
this.nameFrom.departmentmap=this.nameFrom.departmentmap.map(String)
const res = await get_sun_target_info(this.nameFrom)
this.nameFrom.id=this.nameFrom.id.toString()
this.nameFrom.name=this.nameFrom.title
this.nameFrom.postoperator.forEach(ele=>{
ele.operator=ele.operator.userkey
})
// this.nameFrom.departmentmap=this.nameFrom.departmentmap.map(String)
const res = await edit_son_target_cont(this.nameFrom)
this.nameFrom={}
this.getzhilanmuList()
this.showzhiming=false
@ -2455,11 +2451,12 @@ export default {
async getDataList() {
const that = this
this.searchInfo.type=1
this.searchInfo.departmentsPost=this.gwFromList.gwId.toString()
console.log("this.searchInfo")
console.log(this.searchInfo)
// const res = await posttargetsunlist(this.searchInfo)
const res = await posttargetlist(this.searchInfo)
this.tableData = res.data.list
console.log("this.tableData")
console.log(this.tableData)
this.total = res.data.total;
this.searchInfo.page = res.data.page;
this.searchInfo.pagesize = res.data.pageSize;

4
src/views/basicInfo/gwProject.vue

@ -644,7 +644,7 @@ export default {
console.log(newVal);
// const list = []
// list.push(this.gwFromList.gwId.toString())
this.searchInfo.departmentsPost=this.gwFromList.gwId.toString()
this.getPost(this.gwFromList.bmId)
this.getDataList()
},
@ -881,7 +881,6 @@ export default {
async enterDialog() {
this.$refs.addForm.validate(async (valid) => {
if (valid) {
this.form.relevantDepartments =this.gwFromList.bmId.toString()
if (this.form.departmentsPost != null) {
@ -986,6 +985,7 @@ export default {
// this.searchInfo.relevantdepartments =
// this.searchInfo.relevantdepartments.map(String);
// }
this.searchInfo.departmentsPost=this.gwFromList.gwId.toString()
const res = await posttargetlist(this.searchInfo);
this.tableData = res.data.list;
this.total = res.data.total;

1247
src/views/basicInfo/gwTarget.vue

File diff suppressed because it is too large

210
src/views/basicInfo/project.vue

@ -119,6 +119,12 @@
</el-table-column>
<el-table-column label="操作" width="200">
<template #default="scope">
<el-button
icon="el-icon-edit"
size="small"
type="text"
@click="showPost(scope.row)"
>关联岗位</el-button>
<el-button
icon="el-icon-edit"
size="small"
@ -282,24 +288,117 @@
</div>
</template>
</el-dialog>
<!-- 关联岗位弹框 -->
<el-dialog :close-on-click-modal="false" :visible.sync="gwShow" :before-close="addCloseDialog" title="关联岗位" width="40%">
<el-form ref="editForm" :model="editAdd" :rules="editRules" label-width="150px">
<el-form-item
v-for="(iteam, index) in orglist"
label="部门"
:key="index"
>
<el-cascader @change="changeBm(index,iteam.id)" filterable clearable v-model="iteam.id" :options="grouplist" :show-all-levels="false" :props="props1" ></el-cascader>
<el-button @click.prevent="removeBumen(index)">删除</el-button>
<el-table
:data="iteam.child"
style="width: 100%">
<el-table-column
prop="date"
label="关联岗位"
width="180">
<template slot-scope="scope">
<el-select
clearable
v-model="scope.row.id"
filterable
placeholder="请选择"
>
<el-option
v-for="item in postList"
:key="item.idstr"
:label="item.name"
:value="item.idstr"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="name"
label="提报人"
width="180">
<template slot-scope="scope">
<el-cascader
filterable
clearable
v-model="scope.row.childCopy"
:options="grouplistBackup"
:show-all-levels="false"
:props="userProps"
></el-cascader>
</template>
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template slot-scope="scope">
<el-button @click="jiaArrAddXi(index)" type="primary" icon="el-icon-plus" circle size="mini"></el-button>
<el-button
icon="el-icon-delete"
size="small"
type="text"
@click="deleteAddXiList(index,scope)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-button @click="addBumen">新增部门</el-button>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" type="primary" @click="associationPost"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import { positionlist } from "@/api/personnel/post";
import { dutyclasslist } from '@/api/duty/dimension'
import { add_department_target,get_one_terget_info } from '@/api/duty/projectNew'
import { add_department_target,get_one_terget_info,deparment_target_about_post } from '@/api/duty/projectNew'
import { gettarget,addtarget,gettargetinfo,eiteassessinfo,eitetarget,deltarget } from '@/api/duty/project'
import {
getgroupdepartmap,
getgroupuser
} from '@/api/duty/group'
import { tsThisType } from "@babel/types";
export default {
name: 'Dashboard',
props:['bmId'],
data() {
return {
orglist:[
{
// id
id:'',
//
child:[
{
// id
id:'',
//
child:[],
childCopy:[]
}
]
},
],
grouplistBackup:[],
grouplist:[],
gwShow:false,
// 123456
options: [
// {
@ -330,6 +429,13 @@ export default {
emitPath:false,
multiple: true
},
props1: {
checkStrictly: true,
value: "id",
label: "name",
children: "children",
emitPath:false,
},
userProps: {
value: "key",
label: "name",
@ -348,6 +454,7 @@ export default {
switchFrom:{},
//
deleFrom:{},
postList:[],
//
editAdd:{
unittitle:'',
@ -360,6 +467,7 @@ export default {
cycleattr:1,
scoringmethod:1
},
gwShow:false,
//
dialogFormVisible:false,
//
@ -424,6 +532,86 @@ export default {
},
},
methods: {
//
async associationPost(){
this.orglist.forEach(ele=>{
ele.child.forEach(item=>{
ele.id=ele.id.toString()
item.childCopy.forEach(it=>{
item.child.push({id:it,child:[]})
})
})
})
console.log(this.orglist)
const from = {
id:this.projectId,
orglist:this.orglist
}
const res = await deparment_target_about_post(from);
this.gwShow=false
},
//
jiaArrAddXi(index){
console.log("indexJia"+index)
console.log(this.orglist[index])
this.orglist[index].child.push({
// id
id:'',
//
child:[],
childCopy:[]
})
},
//
deleteAddXiList(index,row){
this.orglist[index].childCopy.splice(row.$index,1);
},
//
changeBm(index,id){
console.log("index"+index+','+"id"+id)
this.getPost(id)
},
//
async getPost(val) {
const from = {
organization: val.toString(),
page: 1,
pagesize: 1000000,
};
const res = await positionlist(from);
this.postList = res.data.list;
},
//
removeBumen(index){
console.log("index")
console.log(index)
this.orglist.splice(index,1);
},
//
addBumen(){
this.orglist.push({
// id
id:'',
//
child:[
{
// id
id:'',
//
child:[],
childCopy:[]
}
]
})
},
//
showPost(row){
this.projectId=row.outid
this.gwShow=true
},
//
async getSystemadminlist(){
const from = {
@ -629,6 +817,26 @@ export default {
this.editInitForm()
this.editDialogFormVisible = false
},
//
addCloseDialog() {
this.orglist=[
{
// id
id:'',
//
child:[
{
// id
id:'',
//
childCopy:[],
child:[]
}
]
},
]
this.gwShow = false
},
//
initForm() {
console.log("initForm")

4
src/views/basicInfo/projectBase.vue

@ -29,7 +29,7 @@
<!-- 右侧内容 -->
<el-main style="padding: 10px">
<div v-if="tableGWShow">
<gwProject :gwFromList="gwFromList"></gwProject>
<gwProject :gwFromList="gwFromList" :gwId="gwId"></gwProject>
</div>
<div v-if="tableBMShow">
<project :bmId="bmId"></project>
@ -154,7 +154,7 @@ export default {
methods: {
//
NodePostClick(val) {
this.gwId=val.id
this.gwId=val.id
this.gwFromList.gwId=val.id
this.tableGWShow=true
this.tableBMShow=false

8
src/views/basicInfo/target.vue

@ -755,6 +755,14 @@ export default {
this.chuBuMen()
},
watch:{
bmId(){
console.log("bmid变化")
console.log(this.bmId)
const list = []
list.push(this.bmId)
this.searchInfo.relevantdepartments=list
this.getDataList()
},
tableData() {
this.$nextTick(() => {
this.spanArr=[],

465
src/views/basicInfo/targetBase.vue

@ -0,0 +1,465 @@
<template>
<!-- 考核指标录入 -->
<div class="dashboard-container">
<div class="gva-table-box">
<el-container>
<!-- 左侧内容 -->
<el-aside
width="300px"
style="border-right: 1px solid rgb(220, 223, 230);height: 750px"
>
<el-tree
:data="GovthreeList2"
:props="defaultProps1"
@node-click="handleNodeClick"
></el-tree>
</el-aside>
<el-aside
width="200px"
style="border-right: 1px solid rgb(220, 223, 230);height: 750px"
>
<el-tree
:data="postList"
:props="defaultProps1"
@node-click="NodePostClick"
></el-tree>
</el-aside>
<!-- 右侧内容 -->
<el-main style="padding: 10px">
<div v-if="tableGWShow">
<gwTarget :gwFromList="gwFromList" :gwId="gwId"></gwTarget>
</div>
<div v-if="tableBMShow">
<target :bmId="bmId"></target>
</div>
</el-main>
</el-container>
</div>
</div>
</template>
<script>
import { govthree, positionlist } from "@/api/personnel/post";
import { dutyclasslist } from "@/api/duty/dimension";
import target from "@/views/basicInfo/target.vue";
import gwTarget from "@/views/basicInfo/gwTarget.vue";
import {
posttargetlist,
addtarget,
gettargetinfo,
eiteassessinfo,
eitetarget,
deltarget,
editposttarget,
editstate,
addposttarget,
} from "@/api/duty/project";
import { getgroupdepartmap, getgroupuser } from "@/api/duty/group";
export default {
components: {
target,
gwTarget
},
name: "Dashboard",
data() {
return {
gwFromList:{
gwId:1,
bmId:1
},
tableGWShow: false,
tableBMShow: true,
gwId:1,
bmId:1,
GovthreeList2: [],
defaultProps1: {
children: "child",
label: "name",
},
grouplistBackup: [],
grouplist: [],
props: {
checkStrictly: true,
value: "id",
label: "name",
children: "children",
emitPath: false,
// multiple: true
},
userProps: {
value: "key",
label: "name",
children: "govlist",
emitPath: false,
multiple: true,
},
dutyclasslist: {},
searchList: {
page: 1,
pagesize: 10000,
},
//
editFrom: {},
//
switchFrom: {},
//
deleFrom: {},
//
editAdd: {
unittitle: "",
parentId: "",
},
assessList: {},
//
form: {
share: 2,
cycleattr: 1,
scoringmethod: 1,
},
//
dialogFormVisible: false,
//
editDialogFormVisible: false,
total: 0,
postListAdd: [],
postList: [],
tableData: [],
//
searchInfo: {
page: 1,
pagesize: 10,
},
//
abc: {
aaa: "111",
bbb: "222",
},
};
},
created() {
console.log(this.$store.state.user.token);
if (this.$store.state.user.token == "") {
this.$router.push("/login");
}
//
this.getDataList();
this.getDutyclasslist();
this.getSystemadminlist();
this.getGrouplist();
this.getGovthree2();
},
methods: {
//
NodePostClick(val) {
console.log(val)
this.gwId=val.id
this.gwFromList.gwId=val.id
this.tableGWShow=true
this.tableBMShow=false
console.log('岗位')
console.log(this.gwFromList);
},
//
async getPost(val) {
const from = {
organization: val.toString(),
page: 1,
pagesize: 10,
};
const res = await positionlist(from);
this.postList = res.data.list;
},
//
handleNodeClick(val) {
// this.searchInfo.organization=val.id
// this.searchInfo.organization=this.searchInfo.organization.toString()
this.getPost(val.id);
console.log('bumen ')
this.bmId=val.id
this.gwFromList.bmId=val.id
this.tableGWShow=false
this.tableBMShow=true
console.log(val);
},
//
async departChange(val) {
console.log(val);
// this.searchInfo.organization=val.id
// this.searchInfo.organization=this.searchInfo.organization.toString()
const from = {
organization: val.toString(),
page: 1,
pagesize: 10,
};
const res = await positionlist(from);
this.postListAdd = res.data.list;
console.log(val);
},
//
async getGovthree2() {
const res = await govthree();
this.GovthreeList2 = res.data[0].child;
console.log("this.GovthreeList2");
console.log(res.data[0].child);
},
//
async getSystemadminlist() {
const from = {
level: 4,
};
const res = await getgroupuser(from);
this.grouplistBackup = res.data;
this.grouplistBackup.forEach((item) => {
if (item.govlist != null) {
// this.digui(item);
item.govlist.forEach((items) => {
// forEach,itemthis.digui(item);
this.digui(items); //
//
console.log(items, "看我查看完整的数据哦");
// children
});
} else {
item.govlist = item.child;
//
}
});
console.log(this.grouplistBackup);
},
//
async getGrouplist() {
const res = await getgroupdepartmap();
this.grouplist = res.data;
},
//
async getDutyclasslist() {
const res = await dutyclasslist(this.searchList);
this.dutyclasslist = res.data.list;
},
//
async deleteOperate(row) {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(async () => {
this.deleFrom.state = 3;
this.deleFrom.id = row.id;
this.deleFrom.id = this.deleFrom.id.toString();
const res = await editstate(this.deleFrom);
if (res.code === 0) {
this.$message({
type: "success",
message: "删除成功!",
});
this.getDataList();
}
});
},
//
digui(item) {
//
if (item.govlist != null) {
// valuelabel,
item.govlist.forEach((ff) => {
// children
this.digui(ff);
});
} else {
// children西
// valuelabel,
// --------------------------线---------------------------------
item.govlist = item.child;
}
//
},
//
showAdd() {
this.dialogFormVisible = true;
console.log(this.dialogFormVisible);
},
//
async showEdit(row) {
this.editFrom.outid = row.outid;
const res = await gettargetinfo(this.editFrom);
this.editAdd = res.data;
console.log("this.editAdd");
console.log(this.editAdd);
this.editDialogFormVisible = true;
},
//
async changeVal(val, id) {
this.switchFrom.id = id;
this.switchFrom.id = this.switchFrom.id.toString();
if (val == 1) {
this.switchFrom.state = 1;
const res = await editstate(this.switchFrom);
if (res.code === 0) {
this.$message({
type: "success",
message: "修改状态成功",
showClose: true,
});
this.getDataList();
}
} else {
this.switchFrom.state = 2;
const res = await editstate(this.switchFrom);
if (res.code === 0) {
this.$message({
type: "success",
message: "修改状态成功",
showClose: true,
});
this.getDataList();
}
}
},
//
onReset() {
this.searchInfo = {};
},
//
onSubmit() {
this.searchInfo.page = 1;
this.searchInfo.pagesize = 10;
this.getDataList();
},
//
formatDate(nS) {
return new Date(parseInt(nS) * 1000)
.toLocaleString()
.replace(/:\d{1,2}$/, " ");
},
//
async enterDialog() {
this.$refs.addForm.validate(async (valid) => {
if (valid) {
this.form.relevantDepartments =
this.form.relevantDepartments.toString();
if (this.form.departmentsPost != null) {
this.form.departmentsPost = this.form.departmentsPost.map(String);
}
this.form.cycleattr = parseInt(this.form.cycleattr);
const res = await addposttarget(this.form);
if (res.code === 0) {
this.$message({
type: "success",
message: "添加成功",
showClose: true,
});
}
this.getDataList();
this.closeDialog();
}
});
},
//
async editEnterDialog() {
this.$refs.editForm.validate(async (valid) => {
if (valid) {
if (this.editAdd.relevantdepartmentsmap != null) {
this.editAdd.relevantdepartments =
this.editAdd.relevantdepartmentsmap.map(String);
}
if (this.editAdd.relevantdepartmentsmap == null) {
this.editAdd.relevantdepartments =
this.editAdd.relevantdepartments.split(",");
}
if (this.editAdd.visiblerangedepartmap == null) {
this.editAdd.visiblerange = this.editAdd.visiblerange.split(",");
}
if (this.editAdd.visiblerangegroupmap == null) {
this.editAdd.visiblerangegroup =
this.editAdd.visiblerangegroup.split(",");
}
console.log(this.editAdd.relevantdepartments);
if (this.editAdd.share == 1) {
this.editAdd.relevantdepartments = [];
this.editAdd.relevantdepartmentsmap = [];
this.$delete(this.editAdd, "relevantdepartments");
this.$delete(this.editAdd, "relevantdepartmentsmap");
}
this.editAdd.report = this.editAdd.reportmap;
this.editAdd.dimension = this.editAdd.dimensionidstr;
this.editAdd.cycleattr = parseInt(this.editAdd.cycleattr);
const res = await eitetarget(this.editAdd);
if (res.code === 0) {
this.$message({
type: "success",
message: "编辑成功",
showClose: true,
});
}
this.getDataList();
this.editCloseDialog();
}
});
},
//
closeDialog() {
console.log("closeDialog");
this.initForm();
this.dialogFormVisible = false;
},
//
editCloseDialog() {
this.editInitForm();
this.editDialogFormVisible = false;
},
//
initForm() {
console.log("initForm");
this.$refs.addForm.resetFields();
this.form = {};
console.log(this.form);
},
//
editInitForm() {
this.$refs.editForm.resetFields();
this.editAdd = {};
},
// pageSize
handleSizeChange(val) {
this.searchInfo.pagesize = val;
this.getDataList(this.searchInfo);
},
// page
handleCurrentChange(val) {
this.searchInfo.page = val;
this.getDataList(this.searchInfo);
},
//
async getDataList() {
if (this.searchInfo.relevantdepartments != null) {
this.searchInfo.relevantdepartments =
this.searchInfo.relevantdepartments.map(String);
}
const res = await posttargetlist(this.searchInfo);
this.tableData = res.data.list;
this.total = res.data.total;
this.searchInfo.page = res.data.page;
this.searchInfo.pagesize = res.data.pageSize;
},
},
};
</script>
<style lang="scss" scoped>
.dashboard {
&-container {
margin: 30px;
}
&-text {
font-size: 30px;
line-height: 46px;
}
}
</style>

47
src/views/permission/permissionSetting.vue

@ -15,6 +15,7 @@
:data="data"
:props="defaultProps"
default-expand-all
@node-click="treeClick"
:filter-node-method="filterNode"
ref="tree">
@ -23,6 +24,7 @@
</el-aside>
<!-- 右侧内容 -->
<el-button size="mini" type="primary" icon="el-icon-plus" @click="showAdd()">新增</el-button>
<el-main style="padding:10px">
<div style="">
<div style="width: 180px;float: left;">
@ -83,12 +85,33 @@
</div>
</el-main>
</el-container>
<!-- 新增弹框 -->
<el-dialog :visible.sync="dialogFormVisible" :before-close="closeDialog" title="新增应用系统" width="20%">
<el-form ref="addForm" :model="form" :rules="rules" label-width="150px">
<el-form-item label="名称" prop="title">
<el-input v-model="form.name" autocomplete="off" />
</el-form-item>
<el-form-item label="别名" prop="title">
<el-input v-model="form.coder" autocomplete="off" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model.number="form.sort" autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
const cityOptions = ['暂存', '提交', '打印', '删除'];
import { dutieslist,positionlist } from '@/api/personnel/post'
import { add_system } from '@/api/duty/quanXian'
import { dutyclasslist,statedutyclass,eitedutyclassinfo,getdutyclassinfo,adddutyclass } from '@/api/duty/dimension'
export default {
name: 'Dashboard',
@ -166,7 +189,28 @@ export default {
this.getPositionlistList()
},
methods: {
//
showAdd(){
this.dialogFormVisible=true;
},
//
closeDialog() {
this.dialogFormVisible = false
},
//
async enterDialog(){
const res = await add_system(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '添加成功',
showClose: true
})
}
this.getDataList();
this.closeDialog();
},
//
treeClick(val){
console.log("val")
@ -198,6 +242,7 @@ export default {
},
//
async getPositionlistList() {
const searchInfo = {
page: 1, //
pagesize: 1000000, //

335
src/views/permission/xiTong.vue

@ -0,0 +1,335 @@
<template>
<!-- 系统录入 -->
<div class="dashboard-container">
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="考核维度名称">
<el-input
placeholder="请输入名称"
v-model="searchInfo.title"
clearable>
</el-input>
</el-form-item>
<el-form-item label="考核维度状态">
<el-select v-model="searchInfo.state" clearable placeholder="请选择状态">
<el-option :value=1 label="正常">正常</el-option>
<el-option :value=2 label="禁止">禁止</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="showAdd()">新增</el-button>
</div>
<el-table :data="tableData">
<el-table-column align="left" label="考核维度ID" prop="outId"/>
<el-table-column align="left" label="考核维度名称" prop="title"/>
<el-table-column align="left" label="排序" prop="sort"/>
<el-table-column align="left" label="考核维度状态">
<template #default="scope">
<el-switch
inline-prompt
active-text="正常"
inactive-text="禁止"
v-model="scope.row.state"
active-color="#13ce66"
inactive-color="#ff4949"
:active-value=1
:inactive-value=2
@change="changeVal($event,scope.row.outId)"
/>
</template>
</el-table-column>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
icon="el-icon-edit"
size="small"
type="text"
@click="showEdit(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="small"
type="text"
@click="deleteOperate(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[10, 30, 50, 100]"
:page-size="searchInfo.pagesize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</div>
<!-- 新增弹框 -->
<el-dialog :visible.sync="dialogFormVisible" :before-close="closeDialog" title="新增" width="20%">
<el-form ref="addForm" :model="form" :rules="rules" label-width="150px">
<el-form-item label="考核维度名称" prop="title">
<el-input v-model="form.title" autocomplete="off" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model.number="form.sort" autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
<!-- 编辑弹框 -->
<el-dialog :visible.sync="editDialogFormVisible" :before-close="editCloseDialog" title="修改" width="20%">
<el-form ref="editForm" :model="editAdd" :rules="editRules" label-width="150px">
<el-form-item label="考核维度名称" prop="title">
<el-input v-model="editAdd.title" autocomplete="off" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model.number="editAdd.sort" autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="editCloseDialog"> </el-button>
<el-button size="small" type="primary" @click="editEnterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import { dutyclasslist,statedutyclass,eitedutyclassinfo,getdutyclassinfo,adddutyclass } from '@/api/duty/dimension'
export default {
name: 'Dashboard',
data() {
return {
//
editFrom:{},
//
switchFrom:{},
//
deleFrom:{},
//
editAdd:{},
assessList:{},
//
form:{},
//
dialogFormVisible:false,
//
editDialogFormVisible:false,
total: 0,
tableData:[],
//
searchInfo: {
page: 1,
pagesize: 10
},
//
abc:{
aaa:"111",
bbb:"222"
},
//
rules: {
title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
},
editRules:{
title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
}
}
},
created() {
console.log(this.$store.state.user.token)
if (this.$store.state.user.token=='') {
console.log("跳转login")
this.$router.push('/login')
}
//
this.getDataList()
},
methods: {
//
//
async deleteOperate(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
this.deleFrom.state=3;
this.deleFrom.outid=row.outId;
const res = await statedutyclass(this.deleFrom)
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getDataList()
}
})
},
//
showAdd(){
this.dialogFormVisible=true;
console.log(this.dialogFormVisible)
},
//
async showEdit(row){
this.editFrom.outid=row.outId
const res = await getdutyclassinfo(this.editFrom)
this.editAdd = res.data
this.editDialogFormVisible=true;
},
//
async changeVal(val,id){
console.log(val)
this.switchFrom.outid=id
if (val==1) {
this.switchFrom.state=1;
const res = await statedutyclass(this.switchFrom)
if (res.code === 0) {
this.$message({
type: 'success',
message: '修改状态成功',
showClose: true
})
this.getDataList()
}
} else {
this.switchFrom.state=2;
const res = await statedutyclass(this.switchFrom)
if (res.code === 0) {
this.$message({
type: 'success',
message: '修改状态成功',
showClose: true
})
this.getDataList()
}
}
},
//
onReset() {
this.searchInfo = {}
},
//
onSubmit() {
this.searchInfo.page = 1
this.searchInfo.pagesize = 10
this.getDataList()
},
//
formatDate(nS) {
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
},
//
async enterDialog(){
this.$refs.addForm.validate(async valid => {
if (valid) {
const res = await adddutyclass(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '添加成功',
showClose: true
})
}
this.getDataList();
this.closeDialog();
}
})
},
//
async editEnterDialog(){
this.$refs.editForm.validate(async valid => {
if (valid) {
const res = await eitedutyclassinfo(this.editAdd)
if (res.code === 0) {
this.$message({
type: 'success',
message: '编辑成功',
showClose: true
})
}
this.getDataList();
this.editCloseDialog();
}
})
},
//
closeDialog() {
console.log("closeDialog")
this.initForm()
this.dialogFormVisible = false
},
//
editCloseDialog() {
this.editInitForm()
this.editDialogFormVisible = false
},
//
initForm() {
console.log("initForm")
this.$refs.addForm.resetFields()
this.form = {}
console.log(this.form)
},
//
editInitForm() {
this.$refs.editForm.resetFields()
this.editAdd = {}
},
// pageSize
handleSizeChange(val) {
this.searchInfo.pagesize=val
this.getDataList(this.searchInfo)
},
// page
handleCurrentChange(val) {
this.searchInfo.page=val
this.getDataList(this.searchInfo)
},
//
async getDataList() {
const res = await dutyclasslist(this.searchInfo)
this.tableData = res.data.list
this.total = res.data.total
this.searchInfo.page = res.data.page
this.searchInfo.pagesize = res.data.pageSize
}
}
}
</script>
<style lang="scss" scoped>
.dashboard {
&-container {
margin: 30px;
}
&-text {
font-size: 30px;
line-height: 46px;
}
}
</style>
Loading…
Cancel
Save