鲲鹏 3 years ago
parent
commit
3887074e1a
17 changed files with 237 additions and 102 deletions
  1. +0
    -1
      src/api/assessingTarget/basicTarget.js
  2. +0
    -1
      src/api/assessingTarget/commonquotatask.js
  3. +0
    -1
      src/api/assessingTarget/reward.js
  4. +0
    -1
      src/api/basicTable/category.js
  5. +5
    -4
      src/store/getters.js
  6. +25
    -9
      src/store/modules/base.js
  7. +0
    -1
      src/store/modules/user.js
  8. +36
    -30
      src/views/assessingTarget/basicTarget.vue
  9. +6
    -6
      src/views/assessingTarget/commonquotatask.vue
  10. +99
    -11
      src/views/assessingTarget/constraint.vue
  11. +25
    -10
      src/views/assessingTarget/reward.vue
  12. +22
    -5
      src/views/assessingTarget/search.vue
  13. +18
    -18
      src/views/assessingTarget/tab.vue
  14. +0
    -1
      src/views/basicTable/category.vue
  15. +0
    -1
      src/views/basicTable/conventional.vue
  16. +0
    -1
      src/views/basicTable/search.vue
  17. +1
    -1
      src/views/system/user/index.vue

+ 0
- 1
src/api/assessingTarget/basicTarget.js View File

@@ -1,7 +1,6 @@
import axios from "@/config/axios"
export default{
getList(params){
console.log(params)
return axios.get("/basictask/index",{params})
},
updatePoints(params){

+ 0
- 1
src/api/assessingTarget/commonquotatask.js View File

@@ -1,7 +1,6 @@
import axios from "@/config/axios"
export default{
getList(params){
console.log(params)
return axios.get("/commonquotatask/index",{params})
}
}

+ 0
- 1
src/api/assessingTarget/reward.js View File

@@ -1,7 +1,6 @@
import axios from "@/config/axios"
export default {
getList(params) {
console.log(params)
return axios.get("/specialpower/index", { params })
},
updatePoints(params) {

+ 0
- 1
src/api/basicTable/category.js View File

@@ -2,7 +2,6 @@ import axios from "@/config/axios"

export default {
add(params) {
console.log(params)
return axios.post('/category/add', params)
},
getList(params) {

+ 5
- 4
src/store/getters.js View File

@@ -3,8 +3,9 @@
export default {
theme: state => state.theme,
user: state => state.user,
quota1:state=>state.base.quota1,
quota2:state=>state.base.quota2,
department:state=>state.base.department,
formatDep:state=>state.base.formatDep
quota1: state => state.base.quota1,
quota2: state => state.base.quota2,
department: state => state.base.department,
formatDep: state => state.base.formatDep,
quota: state => state.base.quota
}

+ 25
- 9
src/store/modules/base.js View File

@@ -20,7 +20,8 @@ export default {
formatDep: [],
quota1: [],
quota2: [],
department:[],
department: [],
quota: [],
},
mutations: {
SET_DEPARTMENT(state, data) {
@@ -32,9 +33,11 @@ export default {
SET_QUOTAL2(state, data) {
state.quota2 = data;
},
SET_FORMATDEP(state,data){
console.log(data)
state.formatDep=data;
SET_FORMATDEP(state, data) {
state.formatDep = data;
},
SET_QUOTA(state, data) {
state.quota=data;
}
},
actions: {
@@ -45,11 +48,11 @@ export default {
} else {
axios.get('dept/getDeptList/' + data).then(res => {
let data = res.data.data;
commit('SET_DEPARTMENT',data);
commit('SET_FORMATDEP',formatDet(data))
}).catch(()=>{
commit('SET_DEPARTMENT',[]);
commit('SET_FORMATDEP',[]);
commit('SET_DEPARTMENT', data);
commit('SET_FORMATDEP', formatDet(data))
}).catch(() => {
commit('SET_DEPARTMENT', []);
commit('SET_FORMATDEP', []);
})
}
})
@@ -78,5 +81,18 @@ export default {
})
})
},
getQuotaList({ commit }) {
return new Promise((resolve) => {
axios.get('/rigidityconstraint/getQuotaList').then(res => {
let data = res.data.data;
console.log(data)
commit('SET_QUOTA', data);
resolve(data)
}).catch(() => {
commit('SET_QUOTA', [])
resolve([]);
})
})
},
},
}

+ 0
- 1
src/store/modules/user.js View File

@@ -91,6 +91,5 @@ function menusToRoute(menus) {
});
}
});
console.log(route)
return route;
}

+ 36
- 30
src/views/assessingTarget/basicTarget.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="basic-target ele-body">
<el-card shadow="never">
<tab @get-type="updateType($event)"/>
<tab @update:type="updateType($event)" />
<search :type="1" @search:task="updateParams($event)" />
<el-table
:data="dataList"
@@ -83,10 +83,7 @@
></el-table-column>
<el-table-column label="操作" min-width="100" align="center">
<template slot-scope="{ row }">
<el-button
type="warning"
size="small"
@click="showLeaderDept(row)"
<el-button type="warning" size="small" @click="showLeaderDept(row)"
>设置牵头部门</el-button
>
</template>
@@ -131,9 +128,7 @@
/>
<div slot="footer">
<el-button @click="showDep = false">取消</el-button>&nbsp;
<el-button type="primary" @click="updateLeaderDept"
>保存</el-button
>
<el-button type="primary" @click="updateLeaderDept">保存</el-button>
</div>
</el-dialog>
</el-card>
@@ -152,7 +147,6 @@ export default {
components: {
tab,
search,
taskTable,
Treeselect,
},
mixins: [assessing],
@@ -171,8 +165,15 @@ export default {
searchParams: {
quota1: "",
quota2: "",
leaderDept: undefined,
cooperateDept: undefined,
quota: "",
content: "",
leaderUnit: "",
},
class:{type:0}
updateData: [],
showDep: false,
type:{type:0}
};
},
created() {
@@ -189,32 +190,38 @@ export default {
},
},
methods: {
updateLeaderDept(){
api.updateLeaderDept({itemId:this.updateData.id,leaderDept:this.updateData.leaderDept}).then(()=>{
this.$message({type:"success",message:"设置牵头部门成功"})
}).catch(()=>{
this.$message.error('设置牵头部门失败')
}).finally(()=>{
this.getDataList();
})
updateType(data){
this.type=data;
this.resetCurrentPage();
this.getDataList();
},
updateLeaderDept() {
api
.updateLeaderDept({
itemId: this.updateData.id,
leaderDept: this.updateData.leaderDept.join(","),
})
.then(() => {
this.$message({ type: "success", message: "设置牵头部门成功" });
this.showDep = false;
})
.catch(() => {
this.$message.error("设置牵头部门失败");
})
.finally(() => {
this.getDataList();
});
},
showLeaderDept(data) {
this.showDep = true;
console.log(data)
data.leaderDept=(data.leaderDept&&data.leaderDept.split(','))||[];
this.updateData = data
data.leaderDept = (data.leaderDept && data.leaderDept.split(",")) || [];
this.updateData = data;
},
updateParams(data) {
this.searchParams = data;
this.resetCurrentPage();
this.getDataList();
},
updateType(data) {
console.log(data);
this.class = data;
this.resetCurrentPage();
this.getDataList();
},
resetCurrentPage() {
let page = this.page;
page.page = 1;
@@ -223,7 +230,7 @@ export default {
updatePoints(row) {
api
.updatePoints({
basicTaskId: row.id,
itemId: row.id,
expectedPoints: row.expectedPoints,
})
.then((res) => {
@@ -235,7 +242,6 @@ export default {
});
},
showText(index, bool) {
console.log(index);
let data = this.dataList;
data[index].focus = bool;
this.dataList = data;
@@ -243,7 +249,7 @@ export default {
getDataList() {
this.loading = true;
api
.getList(Object.assign({},this.class, this.searchParams, this.page))
.getList(Object.assign({},this.type, this.searchParams, this.page))
.then((res) => {
this.loading = false;
let data = res.data.data.records;

+ 6
- 6
src/views/assessingTarget/commonquotatask.vue View File

@@ -47,7 +47,7 @@
prop="binjiangDevzone"
></el-table-column>
</el-table>
<el-pagination
<!-- <el-pagination
:current-page.sync="page.page"
:page-size="page.limit"
:total="count"
@@ -56,13 +56,14 @@
:pager-count="5"
class="ele-pagination-circle"
@current-change="getDataList()"
/>
/> -->
</el-card>
</div>
</template>

<script>
import api from "@/api/assessingTarget/commonquotatask";
import {quota} from "@/utils/mixin"
export default {
components: {

@@ -72,7 +73,7 @@ export default {
dataList: [],
loading: false,
count: 0,
tableHeight:document.documentElement.clientHeight - 470,
tableHeight:document.documentElement.clientHeight - 220,
page: {
page: 1,
limit: Math.floor(
@@ -86,12 +87,11 @@ export default {
},
methods: {
getDataList(params) {
getDataList() {
this.loading = true;
api
.getList(params ? Object.assign(this.page, params) : this.page)
.getList( this.page )
.then((res) => {
console.log(res.data);
this.loading = false;
let data = res.data.data
this.dataList = data;

+ 99
- 11
src/views/assessingTarget/constraint.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="reward ele-body">
<el-card shadow="never">
<tab />
<tab @update:type="updateType($event)" />
<search :type="3" @search:task="updateParams($event)" />
<el-table
:data="dataList"
@@ -46,24 +46,34 @@
align="center"
prop="leaderUnit"
></el-table-column>
<el-table-column
label="牵头部门"
min-width="80"
align="center"
prop="leaderDept"
></el-table-column>
<el-table-column label="牵头部门" min-width="150" align="center">
<template slot-scope="{ row }">
<span>{{ row.leaderDeptList | formatList }}</span>
</template>
</el-table-column>
<el-table-column
label="责任领导"
min-width="80"
align="center"
prop="leaderPrincipal"
></el-table-column>
>
<template slot-scope="{ row }">
{{ row.leaderPrincipalList | formatList }}
</template>
</el-table-column>
<el-table-column
label="备注"
align="center"
min-width="150"
prop="note"
></el-table-column>
<el-table-column label="操作" min-width="100" align="center">
<template slot-scope="{ row }">
<el-button type="warning" size="small" @click="showLeaderDept(row)"
>设置牵头部门</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page.sync="page.page"
@@ -75,6 +85,36 @@
class="ele-pagination-circle"
@current-change="getDataList()"
/>
<el-dialog
title="设置牵头部门"
:visible.sync="showDep"
width="400px"
custom-class="ele-dialog-form"
:lock-scroll="false"
:destroy-on-class="true"
>
<treeselect
v-model="updateData.leaderDept"
:options="formatDep"
:multiple="true"
placeholder="请选择牵头部门"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0 ? d.children : undefined,
};
}
"
/>
<div slot="footer">
<el-button @click="showDep = false">取消</el-button>&nbsp;
<el-button type="primary" @click="updateLeaderDept">保存</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
@@ -84,10 +124,14 @@ import tab from "./tab";
import search from "./search";
import api from "@/api/assessingTarget/constraint";
import { quota } from "@/utils/mixin";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect"; // 下拉树
import { mapGetters } from "vuex";
export default {
components: {
tab,
search,
Treeselect,
},
mixins: [quota],
data() {
@@ -105,13 +149,58 @@ export default {
searchParams: {
quota1: "",
quota2: "",
leaderDept: undefined,
cooperateDept: undefined,
quota: "",
content: "",
leaderUnit: "",
},
updateData: [],
showDep: false,
type: { type: 0 },
};
},
created() {
this.getDataList();
},
computed: {
...mapGetters(["formatDep"]),
},
filters: {
formatList(val) {
if (val) {
return val.join(",");
}
},
},
methods: {
updateType(data) {
this.type = data;
this.resetCurrentPage();
this.getDataList();
},
updateLeaderDept() {
api
.updateLeaderDept({
itemId: this.updateData.id,
leaderDept: this.updateData.leaderDept.join(","),
})
.then(() => {
this.$message({ type: "success", message: "设置牵头部门成功" });
this.showDep = false;
})
.catch(() => {
this.$message.error("设置牵头部门失败");
})
.finally(() => {
this.getDataList();
});
},
showLeaderDept(data) {
this.showDep = true;
data.leaderDept = (data.leaderDept && data.leaderDept.split(",")) || [];
this.updateData = data;
},
updateParams(data) {
this.searchParams = data;
this.resetCurrentPage();
@@ -125,7 +214,7 @@ export default {
updatePoints(row) {
api
.updatePoints({
basicTaskId: row.id,
itemId: row.id,
expectedPoints: row.expectedPoints,
})
.then((res) => {
@@ -137,7 +226,6 @@ export default {
});
},
showText(index, bool) {
console.log(index);
let data = this.dataList;
data[index].focus = bool;
this.dataList = data;
@@ -145,7 +233,7 @@ export default {
getDataList() {
this.loading = true;
api
.getList(Object.assign({}, this.searchParams, this.page))
.getList(Object.assign({},this.type, this.searchParams, this.page))
.then((res) => {
this.loading = false;
let data = res.data.data.records;

+ 25
- 10
src/views/assessingTarget/reward.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="reward ele-body">
<el-card shadow="never">
<tab />
<tab @update:type="updateType($event)" />
<search :type="2" @search:task="updateParams($event)" />
<el-table
:data="dataList"
@@ -70,7 +70,11 @@
min-width="80"
align="center"
prop="leaderPrincipal"
></el-table-column>
>
<template slot-scope="{ row }">
{{ row.leaderPrincipalList | formatList }}
</template>
</el-table-column>
<el-table-column
label="备注"
align="center"
@@ -141,6 +145,7 @@ export default {
components: {
tab,
search,
Treeselect,
},
mixins: [assessing],
data() {
@@ -158,9 +163,15 @@ export default {
searchParams: {
quota1: "",
quota2: "",
leaderDept: undefined,
cooperateDept: undefined,
quota: "",
content: "",
leaderUnit: "",
},
updateData:[],
showDep:false,
updateData: [],
showDep: false,
type: { type: 0 },
};
},
created() {
@@ -177,14 +188,20 @@ export default {
},
},
methods: {
updateType(data) {
this.type = data;
this.resetCurrentPage();
this.getDataList();
},
updateLeaderDept() {
api
.updateLeaderDept({
itemId: this.updateData.id,
leaderDept: this.updateData.leaderDept,
leaderDept: this.updateData.leaderDept.join(","),
})
.then(() => {
this.$message({ type: "success", message: "设置牵头部门成功" });
this.showDep = false;
})
.catch(() => {
this.$message.error("设置牵头部门失败");
@@ -195,7 +212,6 @@ export default {
},
showLeaderDept(data) {
this.showDep = true;
console.log(data);
data.leaderDept = (data.leaderDept && data.leaderDept.split(",")) || [];
this.updateData = data;
},
@@ -212,7 +228,7 @@ export default {
updatePoints(row) {
api
.updatePoints({
basicTaskId: row.id,
itemId: row.id,
expectedPoints: row.expectedPoints,
})
.then((res) => {
@@ -224,15 +240,14 @@ export default {
});
},
showText(index, bool) {
console.log(index);
let data = this.dataList;
data[index].focus = bool;
this.dataList = data;
},
getDataList(params) {
getDataList() {
this.loading = true;
api
.getList(Object.assign({}, this.searchParams, this.page))
.getList(Object.assign({},this.type, this.searchParams, this.page))
.then((res) => {
this.loading = false;
let data = res.data.data.records;

+ 22
- 5
src/views/assessingTarget/search.vue View File

@@ -30,8 +30,13 @@
</template>
<template v-if="type == 3">
<el-form-item label="考核指标:">
<el-select filterable clearable>
<el-option></el-option>
<el-select filterable clearable v-model="searchParams.quota">
<el-option
v-for="(item, index) of quota"
:key="index"
:label="item"
:value="item"
></el-option>
</el-select>
</el-form-item>
</template>
@@ -61,7 +66,8 @@
return {
id: d.id,
label: d.name,
children: (d.children&&d.children.length>0)?d.children:undefined,
children:
d.children && d.children.length > 0 ? d.children : undefined,
};
}
"
@@ -78,7 +84,8 @@
return {
id: d.id,
label: d.name,
children: (d.children&&d.children.length>0)?d.children:undefined,
children:
d.children && d.children.length > 0 ? d.children : undefined,
};
}
"
@@ -123,23 +130,33 @@ export default {
quota2: "",
leaderDept: undefined,
cooperateDept: undefined,
quota: "",
content: "",
leaderUnit: "",
},
};
},
created() {
this.getQuota1List(this.type);
this.getDepartment(1);
this.getQuotaList();
},
methods: {
...mapActions({
getQuota1List: "base/getQuota1List",
getQuota2List: "base/getQuota2List",
getDepartment: "base/getDepartment",
getQuotaList: "base/getQuotaList",
}),
clear() {
this.searchParams = {
quota1: "",
quota2: "",
leaderDept: undefined,
cooperateDept: undefined,
quota: "",
content: "",
leaderUnit: "",
};
},
search() {
@@ -147,7 +164,7 @@ export default {
},
},
computed: {
...mapGetters(["quota1", "quota2", "formatDep"]),
...mapGetters(["quota1", "quota2", "formatDep", "quota"]),
},
watch: {
"searchParams.quota1"(val) {

+ 18
- 18
src/views/assessingTarget/tab.vue View File

@@ -1,33 +1,33 @@
<template>
<div class="tab">
<el-radio-group v-model="type" style="margin-bottom: 30px" size="mini">
<el-radio-button :label="0" @change="getType(0)">全部任务</el-radio-button>
<el-radio-button :label="1" @change="getType(1)">部门任务</el-radio-button>
<el-radio-group v-model="type" style="margin-bottom: 30px" size="small" @change="changeParams">
<el-radio-button :label="0">全部任务</el-radio-button>
<el-radio-button :label="1">部门任务</el-radio-button>
</el-radio-group>
</div>
</template>

<script>
export default {
data(){
return{
type: 0,
}
},
methods: {
getType (params) {
this.type = params
this.$emit("get-type", {type: params});
}
data() {
return {
type: 0,
};
},
methods:{
changeParams(){
this.$emit('update:type',{type:this.type})
}
}
};
</script>

<style scoped>
.el-radio-button, /deep/ .el-radio-button__inner{
height:40px;
width:120px;
line-height:23px;
font-size:16px;
.el-radio-button,
/deep/ .el-radio-button__inner {
height: 45px;
width: 120px;
line-height: 23px;
font-size: 16px;
}
</style>

+ 0
- 1
src/views/basicTable/category.vue View File

@@ -234,7 +234,6 @@ export default {
this.ischecked = 'add'
},
look(row) {
console.log(row);
this.form = Object.assign({}, row)
this.dialogTitle = '查看表'
this.showAdd = true

+ 0
- 1
src/views/basicTable/conventional.vue View File

@@ -203,7 +203,6 @@ export default {
.getList(Object.assign({}, this.searchParams, this.page))
.then((res) => {
this.loading = false;
console.log(res.data.data.records);
let data = res.data.data.records;
data = data.map((item) => {
item.year = item.year + "";

+ 0
- 1
src/views/basicTable/search.vue View File

@@ -84,7 +84,6 @@ export default {
},
watch: {
"searchParams.year"(val) {
console.log(val);
if (!val) {
this.$set(this.searchParams, "code", "");
this.codeList = [];

+ 1
- 1
src/views/system/user/index.vue View File

@@ -111,7 +111,7 @@
</el-select>
</el-form-item>
<el-form-item label="部门:" prop="roleIds">
<el-select v-model="editForm.roleIds" placeholder="请选择部门" class="ele-block" clearable multiple>
<el-select v-model="editForm.deptId" placeholder="请选择部门" class="ele-block" clearable multiple>
<el-option v-for="(item,index) in departmentsList" :key="index" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>

Loading…
Cancel
Save