全面优化
This commit is contained in:
@@ -188,7 +188,7 @@ async function pOk() { // 审核提交
|
||||
</el-popover>
|
||||
</div>
|
||||
<!-- 数据列表-->
|
||||
<el-table :data="tableData" @selection-change="handleSelectionChange">
|
||||
<el-table border :data="tableData" @selection-change="handleSelectionChange">
|
||||
<el-table-column align="center" label="ID" prop="user_id" sortable="custom" />
|
||||
<el-table-column align="center" label="头像">
|
||||
<template #default="scope">
|
||||
@@ -204,7 +204,7 @@ async function pOk() { // 审核提交
|
||||
<el-table-column align="center" label="手机号" min-width="150" prop="phone" />
|
||||
<el-table-column align="center" label="所属区域" min-width="150">
|
||||
<template #default="scope">
|
||||
{{scope.row.province>-1?cityList[scope.row.province].name:'无'}}
|
||||
{{scope.row.province>-1?cityList[scope.row.province].province:'无'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态" min-width="150">
|
||||
|
||||
@@ -26,10 +26,16 @@ const brokerageFormRules = ref({
|
||||
course_assistant_teacher:[{ required: true, message: '请输入助教推荐老师佣金占比', trigger: 'blur' }],
|
||||
})
|
||||
const brokerageFormRef = ref(null)
|
||||
const std_percent_arr = ['course_assistant','course_manage','course_assistant_assistant','course_assistant_teacher']
|
||||
// 方法
|
||||
async function getBrokerage() {
|
||||
const res = await api.getBrokerage()
|
||||
if(res.code === 0) {
|
||||
for(let prop in res.data) {
|
||||
if(!std_percent_arr.includes(prop)) {
|
||||
res.data[prop] = parseFloat((res.data[prop]/100).toFixed(2))
|
||||
}
|
||||
}
|
||||
brokerageForm.value = res.data
|
||||
}
|
||||
}
|
||||
@@ -46,7 +52,12 @@ async function submitForm(formEl) {
|
||||
}
|
||||
async function saveData() {
|
||||
const params = {
|
||||
...brokerageForm.value
|
||||
..._.cloneDeep(brokerageForm.value)
|
||||
}
|
||||
for(let prop in params) {
|
||||
if(!std_percent_arr.includes(prop)) {
|
||||
params[prop] = params[prop]*100
|
||||
}
|
||||
}
|
||||
const res = await api.brokerageFunc(params)
|
||||
if(res.code === 0) {
|
||||
|
||||
@@ -208,8 +208,8 @@ async function remoteMethod(query) {
|
||||
<el-select v-model="queryParams.province" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item,index) in cityList"
|
||||
:key="item.ProID"
|
||||
:label="item.name"
|
||||
:key="item.province"
|
||||
:label="item.province"
|
||||
:value="index"
|
||||
/>
|
||||
</el-select>
|
||||
@@ -237,7 +237,7 @@ async function remoteMethod(query) {
|
||||
</el-popover>
|
||||
</div>
|
||||
<!-- 数据列表-->
|
||||
<el-table :data="tableData" @selection-change="handleSelectionChange">
|
||||
<el-table border :data="tableData" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
@@ -252,7 +252,7 @@ async function remoteMethod(query) {
|
||||
<el-table-column align="center" label="手机号" min-width="150" prop="phone" />
|
||||
<el-table-column align="center" label="负责区域" min-width="150">
|
||||
<template #default="scope">
|
||||
{{scope.row.province>-1?cityList[scope.row.province].name:'无'}}
|
||||
{{scope.row.province>-1?cityList[scope.row.province].province:'无'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="150" label="域内市场助教" prop="assistant_num" />
|
||||
@@ -304,8 +304,8 @@ async function remoteMethod(query) {
|
||||
<el-select v-model="mForm.province" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item,index) in cityList"
|
||||
:key="item.ProID"
|
||||
:label="item.name"
|
||||
:key="item.province"
|
||||
:label="item.province"
|
||||
:value="index"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
@@ -103,7 +103,7 @@ function getStateName(state) {
|
||||
<div class="dib-row">
|
||||
<div class="dib-item">
|
||||
<div class="di-left">管理区域:</div>
|
||||
<div class="di-right">{{managerInfo.province>-1?cityList[managerInfo.province].name:'无'}}</div>
|
||||
<div class="di-right">{{managerInfo.province>-1?cityList[managerInfo.province].province:'无'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dib-row">
|
||||
|
||||
Reference in New Issue
Block a user