|
@@ -239,7 +239,7 @@
|
|
<el-popover
|
|
<el-popover
|
|
placement="top-start"
|
|
placement="top-start"
|
|
width="500"
|
|
width="500"
|
|
- trigger="hover"
|
|
|
|
|
|
+ trigger="click"
|
|
@show="getAlignmentList(ele)"
|
|
@show="getAlignmentList(ele)"
|
|
>
|
|
>
|
|
<!--
|
|
<!--
|
|
@@ -247,7 +247,36 @@
|
|
:content="'详细描述:' + (ele.krDesc || '暂无')" -->
|
|
:content="'详细描述:' + (ele.krDesc || '暂无')" -->
|
|
<h2>{{ "KR:" + ele.krInfo }}</h2>
|
|
<h2>{{ "KR:" + ele.krInfo }}</h2>
|
|
<p>{{ "详细描述:" + (ele.krDesc || "暂无") }}</p>
|
|
<p>{{ "详细描述:" + (ele.krDesc || "暂无") }}</p>
|
|
- <div style="text-align: right; margin: 0">
|
|
|
|
|
|
+
|
|
|
|
+ <h2>对齐KR</h2>
|
|
|
|
+ <div>
|
|
|
|
+ <ul>
|
|
|
|
+ <li
|
|
|
|
+ v-for="(list, indexOne) in Alignment"
|
|
|
|
+ style="display: flex; justify-content: space-between"
|
|
|
|
+ >
|
|
|
|
+ <p
|
|
|
|
+ style="
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ width: 100%;
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{ list.krInfo }}
|
|
|
|
+
|
|
|
|
+ <a
|
|
|
|
+ @click="deleteAlignment(list.id, ele)"
|
|
|
|
+ style="
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ color: red;
|
|
|
|
+ "
|
|
|
|
+ >删除</a
|
|
|
|
+ >
|
|
|
|
+ </p>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
<!-- <el-button size="mini" type="text" @click="visible = false"
|
|
<!-- <el-button size="mini" type="text" @click="visible = false"
|
|
>取消</el-button
|
|
>取消</el-button
|
|
>
|
|
>
|
|
@@ -1070,8 +1099,26 @@
|
|
center
|
|
center
|
|
:before-close="OKRhandleClose"
|
|
:before-close="OKRhandleClose"
|
|
>
|
|
>
|
|
- <!-- 人员筛选
|
|
|
|
|
|
+ <!--
|
|
{{ checkedCities }} -->
|
|
{{ checkedCities }} -->
|
|
|
|
+ <div style="margin-bottom: 15px">
|
|
|
|
+ 人员筛选:
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="person"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="getAlignmentPerson"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in optionsPerson"
|
|
|
|
+ :key="item.userId"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.userId"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<ul
|
|
<ul
|
|
class="infinite-list"
|
|
class="infinite-list"
|
|
v-infinite-scroll="getAlignmentPageList"
|
|
v-infinite-scroll="getAlignmentPageList"
|
|
@@ -1094,7 +1141,10 @@
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="AlignmentVisible = false">取 消</el-button>
|
|
<el-button @click="AlignmentVisible = false">取 消</el-button>
|
|
- <el-button type="warning" @click="addAlignmentPageList"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ @click="addAlignmentPageList"
|
|
|
|
+ :loading="okLoading"
|
|
>添 加</el-button
|
|
>添 加</el-button
|
|
>
|
|
>
|
|
</span>
|
|
</span>
|
|
@@ -1135,11 +1185,15 @@ export default {
|
|
components: { Treeselect },
|
|
components: { Treeselect },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ okLoading: false,
|
|
|
|
+ optionsPerson: [],
|
|
|
|
+ person: "",
|
|
AlignmentVisible: false, //添加对齐
|
|
AlignmentVisible: false, //添加对齐
|
|
alignmentList: [], //添加对齐列表
|
|
alignmentList: [], //添加对齐列表
|
|
alignmentPage: 1,
|
|
alignmentPage: 1,
|
|
checkedCities: [],
|
|
checkedCities: [],
|
|
krId: null,
|
|
krId: null,
|
|
|
|
+ Alignment: [],
|
|
yearValue: undefined,
|
|
yearValue: undefined,
|
|
cycleValue: undefined,
|
|
cycleValue: undefined,
|
|
yearsOptions: [],
|
|
yearsOptions: [],
|
|
@@ -1288,16 +1342,27 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
//添加对齐
|
|
//添加对齐
|
|
addAlignmentPageList() {
|
|
addAlignmentPageList() {
|
|
|
|
+ this.okLoading = true;
|
|
postAction(
|
|
postAction(
|
|
- `/okr/kr/alignList?originId=${this.krId}&alignId=${JSON.stringify(
|
|
|
|
- this.checkedCities
|
|
|
|
- )}`
|
|
|
|
|
|
+ `/okr/kr/addAlign?originId=${
|
|
|
|
+ this.krId
|
|
|
|
+ }&alignId=${this.checkedCities.join()}`
|
|
).then((res) => {
|
|
).then((res) => {
|
|
- console.log(res);
|
|
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success("添加对齐成功");
|
|
|
|
+ this.AlignmentVisible = false;
|
|
|
|
+ this.alignmentPage = 1;
|
|
|
|
+ this.okLoading = false;
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.success(res.message);
|
|
|
|
+ this.okLoading = false;
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//设置对齐的列表
|
|
//设置对齐的列表
|
|
setAlignment(ele) {
|
|
setAlignment(ele) {
|
|
|
|
+ this.checkedCities = [];
|
|
|
|
+ this.person = "";
|
|
this.AlignmentVisible = true;
|
|
this.AlignmentVisible = true;
|
|
this.krId = ele.id;
|
|
this.krId = ele.id;
|
|
getAction("/okr/kr/list", {
|
|
getAction("/okr/kr/list", {
|
|
@@ -1305,11 +1370,24 @@ export default {
|
|
quarter: 4,
|
|
quarter: 4,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
|
|
+ userId: this.person,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.alignmentList = res.result.records;
|
|
this.alignmentList = res.result.records;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ postAction("/okr/qywx/getUserListByName", {}).then((res) => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.optionsPerson = res.result;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getAlignmentPerson() {
|
|
|
|
+ this.alignmentPage = 0;
|
|
|
|
+ this.alignmentList = [];
|
|
|
|
+ this.getAlignmentPageList();
|
|
},
|
|
},
|
|
//滚动加载
|
|
//滚动加载
|
|
getAlignmentPageList() {
|
|
getAlignmentPageList() {
|
|
@@ -1319,6 +1397,7 @@ export default {
|
|
quarter: 4,
|
|
quarter: 4,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
pageNo: this.alignmentPage,
|
|
pageNo: this.alignmentPage,
|
|
|
|
+ userId: this.person,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.alignmentList.push(...res.result.records);
|
|
this.alignmentList.push(...res.result.records);
|
|
@@ -1328,10 +1407,26 @@ export default {
|
|
//获取对齐的详情列表
|
|
//获取对齐的详情列表
|
|
getAlignmentList(ele) {
|
|
getAlignmentList(ele) {
|
|
console.log(ele);
|
|
console.log(ele);
|
|
|
|
+ this.Alignment = [];
|
|
postAction(`/okr/kr/alignList?originId=${ele.id}`).then((res) => {
|
|
postAction(`/okr/kr/alignList?originId=${ele.id}`).then((res) => {
|
|
- console.log(res);
|
|
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.Alignment.push(...res.data);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //删除对齐
|
|
|
|
+ deleteAlignment(id, ele) {
|
|
|
|
+ postAction(`/okr/kr/deleteAlign?originId=${ele.id}&alignId=${id}`).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success("删除成功");
|
|
|
|
+ this.getAlignmentList(ele);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("删除失败");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
taskPowerChange(val) {
|
|
taskPowerChange(val) {
|
|
console.log(val);
|
|
console.log(val);
|
|
|
|
|