|
@@ -1,172 +1,162 @@
|
|
|
<template>
|
|
|
- <el-dialog title="派点" :visible.sync="allocationVisible" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleClose">
|
|
|
- <div class="table-cont">
|
|
|
- <table>
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <template v-for="item in datalist">
|
|
|
- <td :key="item" :class="['head-column', 'head-column-item']">
|
|
|
- {{ item.Name }}
|
|
|
- </td>
|
|
|
- <td :key="item" :class="['head-column', 'head-column-item']">
|
|
|
- {{ item.GruopId }}
|
|
|
- </td>
|
|
|
- </template>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- </table>
|
|
|
-
|
|
|
- <div class="table-body-wrapper">
|
|
|
- <table>
|
|
|
- <tbody v-for="(item, index) in datalist" :key="index">
|
|
|
- <tr class="content-ul">
|
|
|
- <template v-for="rs in item.Item">
|
|
|
- <td :key="rs.AdminId">{{ rs.Name }}</td>
|
|
|
- <td :key="rs.AdminId">{{ rs.DepartmentPercentage }}</td>
|
|
|
- </template>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <el-dialog
|
|
|
+ :title="allocationDetailForm.isDlgType == '关联合同' ? '打分详情' : '派点详情'"
|
|
|
+ :width="`${widthDlg}px`"
|
|
|
+ :visible.sync="allocationDetailVisible"
|
|
|
+ v-dialogDrag
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ center
|
|
|
+ @close="handleClose"
|
|
|
+ :append-to-body="true"
|
|
|
+ custom-class="allocation-detail-content_rai"
|
|
|
+ >
|
|
|
+ <p>总点数:{{ allNum }}w</p>
|
|
|
+ <div class="content-box-table-detail">
|
|
|
+ <div class="table-cont table-cont-top">
|
|
|
+ <div style="display: flex" v-for="item in datalist" :key="item.ChartPermissionName">
|
|
|
+ <div :class="['head-column', 'head-column-item']">
|
|
|
+ {{ item.ChartPermissionName }}
|
|
|
+ </div>
|
|
|
+ <div :class="['head-column', 'head-column-item-Proportion']">
|
|
|
+ {{ item.Proportion }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="table-cont">
|
|
|
+ <div v-for="(item, index) in datalist" :key="index">
|
|
|
+ <div style="display: flex" v-for="rs in item.List" :key="rs.RealName" class="content-ul">
|
|
|
+ <div style="background-color: #fff" :class="['head-column', 'head-column-item']">{{ rs.name }}</div>
|
|
|
+ <div style="background-color: #fff" :class="['head-column', 'head-column-item-Proportion']">{{ rs.val }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
|
- <el-button type="primary" @click="addAllocationHandler">修 改</el-button>
|
|
|
+ <el-button v-if="allocationDetailForm.isDlgType != '关联合同'" :disabled="IsGray" type="primary" @click="addAllocationHandler">修 改</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import TemplateMessage from "../../rai_manage/components/apply/templateMessage.vue";
|
|
|
+import { contractInterface } from "@/api/api.js";
|
|
|
+
|
|
|
export default {
|
|
|
name: "",
|
|
|
components: {},
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+ allocationDetailVisible: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true,
|
|
|
+ },
|
|
|
+ allocationDetailForm: {
|
|
|
+ type: Object,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- allocationVisible: true,
|
|
|
- datalist: [
|
|
|
- {
|
|
|
- Item: [
|
|
|
- {
|
|
|
- Name: "测试1", // 研究员
|
|
|
- AdminId: 517,
|
|
|
- ContractCount: 0, // 关联合同
|
|
|
- TotalPoints: 0, // 总派点
|
|
|
- GroupPercentage: 0, // 组内占比
|
|
|
- DepartmentPercentage: 0, // 部门占比
|
|
|
- },
|
|
|
- {
|
|
|
- Name: "测试2", // 研究员
|
|
|
- AdminId: 517,
|
|
|
- ContractCount: 0, // 关联合同
|
|
|
- TotalPoints: 0, // 总派点
|
|
|
- GroupPercentage: 0, // 组内占比
|
|
|
- DepartmentPercentage: 0, // 部门占比
|
|
|
- },
|
|
|
- ],
|
|
|
- Name: "消费组", // 组别
|
|
|
- GruopId: 0,
|
|
|
- },
|
|
|
- {
|
|
|
- Item: [
|
|
|
- {
|
|
|
- Name: "测试1", // 研究员
|
|
|
- AdminId: 517,
|
|
|
- ContractCount: 0, // 关联合同
|
|
|
- TotalPoints: 0, // 总派点
|
|
|
- GroupPercentage: 0, // 组内占比
|
|
|
- DepartmentPercentage: 0, // 部门占比
|
|
|
- },
|
|
|
- {
|
|
|
- Name: "测试2", // 研究员
|
|
|
- AdminId: 517,
|
|
|
- ContractCount: 0, // 关联合同
|
|
|
- TotalPoints: 0, // 总派点
|
|
|
- GroupPercentage: 0, // 组内占比
|
|
|
- DepartmentPercentage: 0, // 部门占比
|
|
|
- },
|
|
|
- ],
|
|
|
- Name: "科技组", // 组别
|
|
|
- GruopId: 0,
|
|
|
- },
|
|
|
- ],
|
|
|
+ datalist: [],
|
|
|
+ IsGray: false,
|
|
|
+ widthDlg: 600,
|
|
|
+ allNum: "",
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ allocationDetailVisible: {
|
|
|
+ handler(newVal) {
|
|
|
+ newVal && this.getList();
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
// 关闭弹框
|
|
|
- handleClose(item) {},
|
|
|
+ handleClose() {
|
|
|
+ this.$emit("update:allocationDetailForm", {});
|
|
|
+ this.$emit("update:allocationDetailVisible", false);
|
|
|
+ },
|
|
|
+ // 点击修改的事件
|
|
|
+ addAllocationHandler() {
|
|
|
+ if (this.IsGray) return;
|
|
|
+ this.handleClose();
|
|
|
+ this.$emit("allocationDetailList", this.allocationDetailForm);
|
|
|
+ },
|
|
|
processingData() {
|
|
|
for (let index = 0; index < this.datalist.length; index++) {}
|
|
|
},
|
|
|
+ // 获取数据
|
|
|
+ async getList() {
|
|
|
+ const res = await contractInterface.getAllocationDetail({
|
|
|
+ CompanyContractId: this.allocationDetailForm.CompanyContractId,
|
|
|
+ ShowDetail: true,
|
|
|
+ });
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ if (res.Data.List.length > 3) {
|
|
|
+ let isWidth = (res.Data.List.length - 3) * 200;
|
|
|
+ this.widthDlg = this.widthDlg + isWidth;
|
|
|
+ }
|
|
|
+ this.IsGray = res.Data.IsGray;
|
|
|
+ let maxLength = 0;
|
|
|
+ res.Data.List &&
|
|
|
+ res.Data.List.forEach((item) => {
|
|
|
+ if (maxLength < item.List.length) {
|
|
|
+ console.log(1212);
|
|
|
+ maxLength = item.List.length;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ res.Data.List &&
|
|
|
+ res.Data.List.forEach((item) => {
|
|
|
+ for (let index = 0; index < maxLength; index++) {
|
|
|
+ item.List[index] = {
|
|
|
+ name: item.List[index] ? item.List[index].RealName : "",
|
|
|
+ val: item.List[index] ? item.List[index].Proportion : "",
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.datalist = res.Data.List;
|
|
|
+ this.allNum = res.Data.Money;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-<style scoped lang="scss">
|
|
|
-.table-cont {
|
|
|
- .table-body-wrapper {
|
|
|
- max-height: calc(100vh - 340px);
|
|
|
- margin-right: -6px;
|
|
|
- overflow-y: scroll;
|
|
|
- overflow-x: auto;
|
|
|
- border-bottom: 1px solid #dcdfe6;
|
|
|
- border-top: 1px solid #dcdfe6;
|
|
|
- }
|
|
|
- .head-column-item {
|
|
|
- width: 15%;
|
|
|
- }
|
|
|
- table {
|
|
|
- width: 100%;
|
|
|
- font-size: 14px;
|
|
|
- color: #666;
|
|
|
- thead {
|
|
|
+<style lang="scss">
|
|
|
+.allocation-detail-content_rai {
|
|
|
+ .content-box-table-detail {
|
|
|
+ position: relative;
|
|
|
+ margin-top: 20px;
|
|
|
+ .table-cont-top {
|
|
|
position: sticky;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
- border-left: 1px solid #dcdfe6;
|
|
|
- border-right: 1px solid #dcdfe6;
|
|
|
- td {
|
|
|
- border: none;
|
|
|
- outline-color: #dcdfe6;
|
|
|
- outline-style: solid;
|
|
|
- outline-width: 0.5px;
|
|
|
- }
|
|
|
}
|
|
|
- td,
|
|
|
- th {
|
|
|
- min-width: 35px;
|
|
|
- // word-break: break-all;
|
|
|
- border: 1px solid #dcdfe6;
|
|
|
- height: 45px;
|
|
|
- text-align: center;
|
|
|
- background-color: #fff;
|
|
|
+ .table-cont {
|
|
|
+ display: flex;
|
|
|
}
|
|
|
-
|
|
|
.head-column {
|
|
|
- background-color: #f0f2f5;
|
|
|
- }
|
|
|
-
|
|
|
- .data-cell {
|
|
|
- color: #409eff;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
-
|
|
|
- .thead-sticky {
|
|
|
- position: sticky;
|
|
|
- top: 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ background-color: #ebeef5;
|
|
|
+ color: #333333;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-top: -1px;
|
|
|
+ margin-left: -0.5px;
|
|
|
}
|
|
|
- }
|
|
|
- .content-ul {
|
|
|
- td {
|
|
|
- width: 15%;
|
|
|
+ .head-column-item {
|
|
|
+ width: 107px;
|
|
|
+ height: 48px;
|
|
|
}
|
|
|
- .association {
|
|
|
- color: #409eff;
|
|
|
- cursor: pointer;
|
|
|
+ .head-column-item-Proportion {
|
|
|
+ width: 73px;
|
|
|
+ height: 48px;
|
|
|
}
|
|
|
}
|
|
|
}
|