yujialong 1 month ago
parent df33b0b5eb
commit 4779595867
  1. 72
      src/views/match/manage/theoryReport.vue
  2. 221
      src/views/parner/staff.vue

@ -129,16 +129,18 @@
<el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag> <el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag>
<div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div> <div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div>
<p>{{ ques.questionScore }}</p> <p v-if="!ques.notScored">{{ ques.questionScore }}</p>
</div> </div>
<div <div
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList" v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList"
class="m-b-10"> class="m-b-10">
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> <div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt">
<template v-if="!ques.notScored">
<img v-if="opt.optCorrect === 1" src="@/assets/img/right.svg" alt="" class="icon"> <img v-if="opt.optCorrect === 1" src="@/assets/img/right.svg" alt="" class="icon">
<img v-else-if="!opt.optCorrect" src="@/assets/img/wrong.svg" alt="" class="icon"> <img v-else-if="!opt.optCorrect" src="@/assets/img/wrong.svg" alt="" class="icon">
<span v-else class="icon not-ans"></span> <span v-else class="icon not-ans"></span>
</template>
<span>{{ numToLetter(j) }}.&nbsp;</span> <span>{{ numToLetter(j) }}.&nbsp;</span>
<div class="text html-parse" v-html="opt.optionText"></div> <div class="text html-parse" v-html="opt.optionText"></div>
@ -170,25 +172,34 @@
<div v-else>暂无解析</div> <div v-else>暂无解析</div>
</div> </div>
<div :class="['ques-info', { essay: item.questionType === 'essay' && ques.scoringStatus === '未判分' }]"> <div
:class="['ques-info', { essay: item.questionType === 'essay' && ques.scoringStatus === '未判分' && !ques.notScored }]">
<!-- 主观题 -->
<template v-if="item.questionType === 'essay'"> <template v-if="item.questionType === 'essay'">
<div class="line"> <div class="line">
<span class="line-label">参考答案</span> <span class="line-label">参考答案</span>
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div> <div v-if="ques.questionAnswerVersionsList[0].referenceAnswer"
v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div>
<span v-else>暂无参考答案</span>
</div> </div>
<div class="line"> <div class="line">
<span class="line-label">考生答案</span> <span class="line-label">考生答案</span>
<div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div> <p v-if="!ques.richTextStatus">无需作答</p>
<div v-else>未作答</div> <div v-else-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div>
<p v-else>未作答</p>
</div> </div>
<div v-if="ques.attachmentUrl" class="line"> <div v-if="ques.allowAttachment" class="line">
<span class="line-label">考生上传附件</span> <span class="line-label">考生上传附件</span>
<template v-if="ques.attachmentUrl">
<el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{ <el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{
ques.attachmentName }}</el-link> ques.attachmentName }}</el-link>
<el-button type="primary" size="mini" round <el-button type="primary" size="mini" round
@click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button> @click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button>
</template>
<span v-else>未上传</span>
</div> </div>
</template> </template>
<!-- 客观题 -->
<template v-else> <template v-else>
<div class="line">正确答案{{ ques.quesAnswer }}</div> <div class="line">正确答案{{ ques.quesAnswer }}</div>
<div class="line"> <div class="line">
@ -197,16 +208,21 @@
<div v-else-if="ques.userAnswerFill" class="fill-answers"> <div v-else-if="ques.userAnswerFill" class="fill-answers">
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> <p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer">
填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }} 填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }}
<template v-if="!ques.notScored">
<img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon"> <img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon">
<img v-else src="@/assets/img/wrong.svg" alt="" class="icon"> <img v-else src="@/assets/img/wrong.svg" alt="" class="icon">
</template>
</p> </p>
</div> </div>
<span v-else>未作答</span>
</div> </div>
</template> </template>
<div class="line">题目分值{{ ques.questionScore }}</div> <div class="line">题目分值{{ ques.notScored ? '不计分' : ques.questionScore + '分' }}</div>
<div class="line">考生得分<el-input class="score-input" size="small" :value="ques.userScore" <div class="line">考生得分<template v-if="ques.notScored">不计分</template>
disabled /> <template v-else>
<el-input class="score-input" size="small" :value="ques.userScore" disabled />
</template>
</div> </div>
<div v-for="(coment, k) in ques.comment" :key="k" class="line"> <div v-for="(coment, k) in ques.comment" :key="k" class="line">
@ -287,6 +303,10 @@ export default {
id: 4, id: 4,
name: '待判分' name: '待判分'
}, },
{
id: 5,
name: '不计分'
},
], ],
outlines: [], outlines: [],
paper: [], paper: [],
@ -331,6 +351,8 @@ export default {
} }
} }
n.notScored = n.questionScore === 0 // =0
if (n.notScored) n.userScore = '-'
const opts = n.questionAnswerVersionsList const opts = n.questionAnswerVersionsList
if (type !== 'fill_blank' && type !== 'essay') { // if (type !== 'fill_blank' && type !== 'essay') { //
if (!n.userScore) n.userScore = 0 if (!n.userScore) n.userScore = 0
@ -379,7 +401,7 @@ export default {
// //
let rightLen = 0 let rightLen = 0
if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length // if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length //
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2) n.isCorrect = n.notScored ? 5 : (n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2))
} else if (type === 'essay') { // } else if (type === 'essay') { //
this.handleIsCorrect(n) this.handleIsCorrect(n)
} }
@ -417,7 +439,7 @@ export default {
}, },
// //
handleIsCorrect (n) { handleIsCorrect (n) {
n.isCorrect = n.userScore === undefined ? 4 : (n.userScore === n.questionScore ? 1 : n.userScore ? 3 : 2) // reviewScore 0 n.isCorrect = n.notScored ? 5 : (n.userScore === undefined ? 4 : (n.userScore === n.questionScore ? 1 : n.userScore ? 3 : 2)) // reviewScore 0
}, },
scrollToSmooth (position, duration) { scrollToSmooth (position, duration) {
let startTime = Date.now() let startTime = Date.now()
@ -633,7 +655,7 @@ samp {
} }
.left { .left {
width: 290px; width: 320px;
margin-right: 15px; margin-right: 15px;
background-color: #fff; background-color: #fff;
@ -713,6 +735,12 @@ samp {
border-color: #fe9f0a; border-color: #fe9f0a;
} }
.status5 .serial {
color: #fff;
background-color: #d1d1d1;
border-color: #d1d1d1;
}
.score { .score {
height: 22px; height: 22px;
padding: 0 2px; padding: 0 2px;
@ -725,7 +753,7 @@ samp {
.status-filter { .status-filter {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 10px; padding: 10px 0;
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
li { li {
@ -735,6 +763,7 @@ samp {
font-size: 12px; font-size: 12px;
color: #333; color: #333;
cursor: pointer; cursor: pointer;
white-space: nowrap;
border: 1px solid transparent; border: 1px solid transparent;
&:before { &:before {
@ -778,7 +807,7 @@ samp {
} }
} }
&:last-child { &:nth-child(4) {
&.active { &.active {
color: #fe9f0a; color: #fe9f0a;
border-color: #fe9f0a; border-color: #fe9f0a;
@ -789,6 +818,17 @@ samp {
} }
} }
&:last-child {
&.active {
color: #d1d1d1;
border-color: #d1d1d1;
}
&:before {
background-color: #d1d1d1;
}
}
&.active { &.active {
font-weight: 600; font-weight: 600;
} }
@ -797,7 +837,7 @@ samp {
} }
.right { .right {
width: calc(100% - 325px); width: calc(100% - 355px);
height: calc(100vh - 287px); height: calc(100vh - 287px);
padding: 10px; padding: 10px;
background-color: #fff; background-color: #fff;

@ -21,37 +21,20 @@
</div> </div>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">
<el-tree <el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current
:data="orgList" :expand-on-click-node="false" @node-click="handleNodeClick"
default-expand-all :props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }">
ref="orgTree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="handleNodeClick"
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}"
>
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span> <span class="org-name">{{ node.label }}</span>
<span> <span>
<!-- isTeam 0: 分类1: 团队 --> <!-- isTeam 0: 分类1: 团队 -->
<el-button <el-button v-auth="'/parner:账号管理:添加分类'" v-if="!data.isTeam" type="text"
v-auth="'/parner:账号管理:添加分类'" icon="el-icon-circle-plus-outline" @click="() => addOrg(node, data)">
v-if="!data.isTeam"
type="text"
icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)">
</el-button> </el-button>
<el-button <el-button v-auth="'/parner:账号管理:编辑分类'" type="text" icon="el-icon-edit-outline"
v-auth="'/parner:账号管理:编辑分类'"
type="text"
icon="el-icon-edit-outline"
@click="() => editOrg(node, data)"> @click="() => editOrg(node, data)">
</el-button> </el-button>
<el-button <el-button v-auth="'/parner:账号管理:删除分类'" type="text" icon="el-icon-delete"
v-auth="'/parner:账号管理:删除分类'"
type="text"
icon="el-icon-delete"
@click="() => delOrg(node, data)"> @click="() => delOrg(node, data)">
</el-button> </el-button>
</span> </span>
@ -60,27 +43,16 @@
</div> </div>
</div> </div>
<el-dialog <el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false"
:title="typeForm.id ? '编辑' : '新增' + '分类'" width="50%" @close="closeType">
:visible.sync="orgVisible"
:close-on-click-modal="false"
width="50%"
@close="closeType"
>
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px"> <el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px">
<el-form-item label="分类名称" prop="partnerClassificationName"> <el-form-item label="分类名称" prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input> <el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上级部门"> <el-form-item label="上级部门">
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span> <span v-if="typeForm.parentName">{{ typeForm.parentName }}</span>
<el-cascader <el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
v-else style="width: 100%">
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%"
>
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -96,7 +68,8 @@
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input> <el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord"
clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
@ -104,22 +77,25 @@
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column> <el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column>
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> <el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column> <el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column>
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column> <el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<template v-if="!type"> <template v-if="!type">
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column> <el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column> <el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="roleName" label="授权角色" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="phone" label="费率" align="center" min-width="120"> <el-table-column prop="phone" label="费率" align="center" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee}}w</p> <p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee }}w</p>
<p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee}}%</p> <p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee }}%</p>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -130,16 +106,20 @@
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button> <el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> <el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button> <el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button> <el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'"
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button> @click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'"
@click="remove(scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" :close-on-click-modal="false" @close="closeAdd"> <el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia"
:close-on-click-modal="false" @close="closeAdd">
<p class="tips">链接/二维码失效时间{{ expireTime }}</p> <p class="tips">链接/二维码失效时间{{ expireTime }}</p>
<p class="title">城市合伙人 <em>邀请链接</em></p> <p class="title">城市合伙人 <em>邀请链接</em></p>
<p class="des">加盟商合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p> <p class="des">加盟商合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p>
@ -152,21 +132,24 @@
<img width="250" :src="qrcode" alt=""> <img width="250" :src="qrcode" alt="">
</el-dialog> </el-dialog>
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" :close-on-click-modal="false"> <el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia"
:close-on-click-modal="false">
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="showChoose">转给团队成员</el-button> <el-button type="primary" @click="showChoose">转给团队成员</el-button>
<el-button @click="add(1)">邀请外部人员</el-button> <el-button @click="add(1)">邀请外部人员</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" :close-on-click-modal="false"> <el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia"
:close-on-click-modal="false">
<ul class="member-list"> <ul class="member-list">
<li v-for="(item, i) in members" :key="i"> <li v-for="(item, i) in members" :key="i">
<div class="info"> <div class="info">
<img src="@/assets/img/avatar.png" alt=""> <img src="@/assets/img/avatar.png" alt="">
<span class="name">{{ item.userName }}</span> <span class="name">{{ item.userName }}</span>
</div> </div>
<el-radio v-model="choosePartnerId" :label="item.partnerId" :disabled="curRow.accountId === item.accountId"></el-radio> <el-radio v-model="choosePartnerId" :label="item.partnerId"
:disabled="curRow.accountId === item.accountId"></el-radio>
</li> </li>
</ul> </ul>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -184,22 +167,22 @@
<el-select class="w-100" v-model="form.roleList" multiple> <el-select class="w-100" v-model="form.roleList" multiple>
<template v-for="item in roleList"> <template v-for="item in roleList">
<!-- 不显示超管 --> <!-- 不显示超管 -->
<el-option <el-option :key="item.id" :label="item.roleName" :value="item.id">
:key="item.id"
:label="item.roleName"
:value="item.id">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="provinceId" label="省份"> <el-form-item prop="provinceId" label="省份">
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity"> <el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> <el-option v-for="(item, index) in provinces" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="cityId" label="城市"> <el-form-item prop="cityId" label="城市">
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="form.provinceId ? false : true"> <el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市"
<el-option v-for="(item,index) in cities" :key="index" :label="item.cityName" :value="item.cityId"></el-option> :disabled="form.provinceId ? false : true">
<el-option v-for="(item, index) in cities" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -220,7 +203,7 @@ import clipboard from '@/libs/clipboard'
import axios from 'axios' import axios from 'axios'
export default { export default {
components: { OrgTree }, components: { OrgTree },
data() { data () {
return { return {
accountId: this.$store.state.accountId, accountId: this.$store.state.accountId,
userName: this.$store.state.userName, userName: this.$store.state.userName,
@ -299,19 +282,19 @@ export default {
}; };
}, },
watch: { watch: {
keyWord: function(val) { keyWord: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(this.initData, 500); this.searchTimer = setTimeout(this.initData, 500);
} }
}, },
mounted() { mounted () {
this.getOrg() this.getOrg()
this.getProvince() this.getProvince()
this.getRole() this.getRole()
}, },
methods: { methods: {
// //
async getOrg() { async getOrg () {
const res = await this.$post(this.api.listParner) const res = await this.$post(this.api.listParner)
const list = res.treeList const list = res.treeList
// children // children
@ -338,13 +321,13 @@ export default {
this.getList() this.getList()
}, },
// //
typeChange() { typeChange () {
this.$refs.orgTree.setCurrentKey(null) this.$refs.orgTree.setCurrentKey(null)
this.curTeamId = '' this.curTeamId = ''
this.initData() this.initData()
}, },
// //
addOrg(node, data) { addOrg (node, data) {
const list = JSON.parse(JSON.stringify(this.orgList)) const list = JSON.parse(JSON.stringify(this.orgList))
this.handleOrg(list) this.handleOrg(list)
this.orgListDia = list this.orgListDia = list
@ -359,7 +342,7 @@ export default {
this.orgVisible = true this.orgVisible = true
}, },
// //
editOrg(node, data) { editOrg (node, data) {
const list = JSON.parse(JSON.stringify(this.orgList)) const list = JSON.parse(JSON.stringify(this.orgList))
this.handleOrg(list) this.handleOrg(list)
this.orgListDia = list this.orgListDia = list
@ -374,14 +357,14 @@ export default {
this.cascaderValue = ids this.cascaderValue = ids
}, },
// //
closeType() { closeType () {
this.typeForm = { this.typeForm = {
id: '', id: '',
partnerClassificationName: '' partnerClassificationName: ''
} }
}, },
// //
handleOrg(list) { handleOrg (list) {
for (const i in list) { for (const i in list) {
const e = list[i] const e = list[i]
// //
@ -393,18 +376,18 @@ export default {
} }
}, },
// //
delOrg(node, data) { delOrg (node, data) {
this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", { this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => { this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => {
util.successMsg("删除成功") util.successMsg("删除成功")
this.getOrg() this.getOrg()
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
// / // /
orgSubmit() { orgSubmit () {
this.$refs.typeForm.validate((valid) => { this.$refs.typeForm.validate((valid) => {
if (valid) { if (valid) {
const form = this.typeForm const form = this.typeForm
@ -419,20 +402,20 @@ export default {
this.$post(this.api.saveParner, form).then(res => { this.$post(this.api.saveParner, form).then(res => {
util.successMsg("新增成功!") util.successMsg("新增成功!")
this.closeOrg() this.closeOrg()
}).catch(err => {}) }).catch(err => { })
} else { } else {
// //
this.$post(this.api.updateParner, form).then(res => { this.$post(this.api.updateParner, form).then(res => {
util.successMsg("编辑成功!") util.successMsg("编辑成功!")
this.setKey = form.id this.setKey = form.id
this.closeOrg() this.closeOrg()
}).catch(err => {}) }).catch(err => { })
} }
} }
}); });
}, },
// id // id
getTeamId(list) { getTeamId (list) {
for (const i in list) { for (const i in list) {
const e = list[i] const e = list[i]
if (e.isTeam && !this.curTeamId) { if (e.isTeam && !this.curTeamId) {
@ -444,7 +427,7 @@ export default {
} }
}, },
// //
handleNodeClick(data) { handleNodeClick (data) {
this.type = '' this.type = ''
this.curTeamId = '' this.curTeamId = ''
if (data.isTeam) { if (data.isTeam) {
@ -457,18 +440,18 @@ export default {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}, },
// //
closeOrg() { closeOrg () {
this.orgVisible = false this.orgVisible = false
this.cascaderValue = [] this.cascaderValue = []
this.getOrg() this.getOrg()
}, },
// //
getAll() { getAll () {
this.curTeamId = '' this.curTeamId = ''
this.getList() this.getList()
}, },
// //
getList() { getList () {
this.$post(this.api[this.type ? 'partnerAccountMergeList' : 'partnerAccountList'], { this.$post(this.api[this.type ? 'partnerAccountMergeList' : 'partnerAccountList'], {
type: this.type || 1, type: this.type || 1,
partnerClassificationId: this.curTeamId, partnerClassificationId: this.curTeamId,
@ -483,49 +466,49 @@ export default {
console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData) console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData)
this.total = pageList.total this.total = pageList.total
}).catch(err => {}) }).catch(err => { })
}, },
// //
currentChange(val) { currentChange (val) {
this.page = val this.page = val
this.getList() this.getList()
}, },
handleSelectionChange(val) { // handleSelectionChange (val) { //
this.multipleSelection = val this.multipleSelection = val
}, },
initData() { initData () {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.page = 1 this.page = 1
this.getList() this.getList()
}, },
// //
getProvince(){ getProvince () {
this.$get(this.api.queryProvince).then(res => { this.$get(this.api.queryProvince).then(res => {
this.provinces = res.list this.provinces = res.list
}).catch(res => {}) }).catch(res => { })
}, },
// //
getCity(val){ getCity (val) {
this.$get(this.api.queryCity,{ this.$get(this.api.queryCity, {
provinceId: this.form.provinceId provinceId: this.form.provinceId
}).then(res => { }).then(res => {
this.cities = res.list this.cities = res.list
if (val) this.form.cityId = '' if (val) this.form.cityId = ''
}).catch(res => {}) }).catch(res => { })
}, },
// //
del(row) { del (row) {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => { this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => {
util.successMsg("删除成功") util.successMsg("删除成功")
this.getList() this.getList()
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
// //
remove(row) { remove (row) {
this.$confirm("确定要移除吗?", "提示", { this.$confirm("确定要移除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
@ -535,22 +518,22 @@ export default {
}).then(res => { }).then(res => {
util.successMsg("移除成功") util.successMsg("移除成功")
this.getList() this.getList()
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
// //
transfer(row) { transfer (row) {
this.curRow = row this.curRow = row
this.transferVisible = true this.transferVisible = true
}, },
getRole() { getRole () {
// platformId 4setting.jsport: pc01 // platformId 4setting.jsport: pc01
this.$get(`${this.api.roleList}?page=1&size=10000&platformId=4&port=1&name=`).then(res => { this.$get(`${this.api.roleList}?page=1&size=10000&platformId=4&port=1&name=`).then(res => {
this.roleList = res.rolePage.records; this.roleList = res.rolePage.records;
}).catch(res => {}); }).catch(res => { });
}, },
// //
edit(row) { edit (row) {
if (!row.provinceId) row.provinceId = '' if (!row.provinceId) row.provinceId = ''
if (!row.cityId) row.cityId = '' if (!row.cityId) row.cityId = ''
row.roleList = row.roleId.split(',').map(e => +e) row.roleList = row.roleId.split(',').map(e => +e)
@ -559,7 +542,7 @@ export default {
row.cityId && this.getCity() row.cityId && this.getCity()
}, },
// //
submitEdit() { submitEdit () {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.submiting) return false if (this.submiting) return false
@ -582,16 +565,16 @@ export default {
}) })
}, },
// //
resetPassword(row) { resetPassword (row) {
const newPwd = Setting.initialPassword const newPwd = Setting.initialPassword
this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => { this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => {
this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => { this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => {
util.successMsg("重置成功") util.successMsg("重置成功")
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
// //
showChoose() { showChoose () {
this.chooseVisible = true this.chooseVisible = true
this.$post(this.api.partnerAccountList, { this.$post(this.api.partnerAccountList, {
type: 1, type: 1,
@ -601,10 +584,10 @@ export default {
pageSize: 10000 pageSize: 10000
}).then(({ pageList }) => { }).then(({ pageList }) => {
this.members = pageList.records this.members = pageList.records
}).catch(err => {}) }).catch(err => { })
}, },
// //
chooseSubmit() { chooseSubmit () {
const { curRow } = this const { curRow } = this
const id = this.choosePartnerId const id = this.choosePartnerId
const member = this.members.find(e => e.partnerId === id) // const member = this.members.find(e => e.partnerId === id) //
@ -619,13 +602,13 @@ export default {
this.chooseVisible = false this.chooseVisible = false
this.transferVisible = false this.transferVisible = false
this.getOrg() this.getOrg()
}).catch(err => {}) }).catch(err => { })
} else { } else {
util.warningMsg('请选择成员!') util.warningMsg('请选择成员!')
} }
}, },
// //
add(transfer) { add (transfer) {
// //
if (!transfer) { if (!transfer) {
const curNode = this.$refs.orgTree.getCurrentNode() const curNode = this.$refs.orgTree.getCurrentNode()
@ -647,14 +630,14 @@ export default {
responseType: 'blob' responseType: 'blob'
}).then(({ data }) => { }).then(({ data }) => {
this.qrcode = window.URL.createObjectURL(data) this.qrcode = window.URL.createObjectURL(data)
}).catch(res => {}) }).catch(res => { })
}).catch(res => {}) }).catch(res => { })
}, },
closeAdd() { closeAdd () {
this.initData() this.initData()
}, },
// //
copy(e) { copy (e) {
clipboard(this.link, e, '链接已复制!') clipboard(this.link, e, '链接已复制!')
} }
} }
@ -665,47 +648,58 @@ export default {
.m-b-20 { .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.org-name { .org-name {
margin-right: 20px; margin-right: 20px;
} }
.w-100 { .w-100 {
width: 100%; width: 100%;
} }
.wrap { .wrap {
display: flex; display: flex;
padding: 0 24px; padding: 0 24px;
.side { .side {
width: 300px; width: 300px;
padding: 24px 10px 24px 0; padding: 24px 10px 24px 0;
margin-right: 24px; margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06); border-right: 1px solid rgba(0, 0, 0, 0.06);
} }
.right { .right {
width: calc(100% - 324px); width: calc(100% - 324px);
padding: 24px 0; padding: 24px 0;
} }
} }
.add-dia { .add-dia {
.tips { .tips {
font-size: 12px; font-size: 12px;
color: #f00; color: #f00;
} }
.title { .title {
margin: 10px 0; margin: 10px 0;
font-size: 14px; font-size: 14px;
em { em {
font-style: normal; font-style: normal;
} }
} }
.des { .des {
font-size: 13px; font-size: 13px;
color: #7a7a7a; color: #7a7a7a;
} }
.link-wrap { .link-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 10px 0 20px; margin: 10px 0 20px;
} }
.link { .link {
padding: 10px; padding: 10px;
margin-right: 15px; margin-right: 15px;
@ -713,6 +707,7 @@ export default {
border-radius: 4px; border-radius: 4px;
} }
} }
/deep/.choose-dia { /deep/.choose-dia {
.member-list { .member-list {
li { li {
@ -721,17 +716,21 @@ export default {
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.info { .info {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.name { .name {
margin-left: 10px; margin-left: 10px;
} }
.el-radio__label { .el-radio__label {
display: none; display: none;
} }

Loading…
Cancel
Save