dev_review
yujialong 2 years ago
parent 996658ba20
commit e8672494e4
  1. 2
      src/components/Header.vue
  2. 2
      src/setting.js
  3. 1
      src/utils/api.js
  4. 282
      src/views/customer/customer.vue
  5. 8
      src/views/match/add/set.vue
  6. 187
      src/views/match/manage/matchReport.vue
  7. 216
      src/views/parner/rate.vue
  8. 320
      src/views/serve/projectAdd.vue
  9. 6
      src/views/serve/projectList.vue
  10. 3
      src/views/shop/addProduct/index.vue

@ -87,13 +87,13 @@ export default {
getUserInfo () {
this.$get(this.api.queryUserInfoDetails).then(({ result }) => {
this.initSocket(result.userAccount)
let userInfo = result.hrUserInfo
if (userInfo.userAvatars) this.$store.commit('userAvatar', { avatar: userInfo.userAvatars })
this.userName = userInfo.userName
const { id } = result.userAccount
id && this.$store.commit('SET_ACCOUNTID', id)
this.$store.commit('SET_USERNAME', this.userName)
this.initSocket(result.userAccount)
}).catch(err => { })
},
},

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
host = 'http://192.168.31.152:9000/'// 榕
host = 'http://192.168.31.217:9000/'// 榕
// host = 'http://192.168.31.51:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -45,6 +45,7 @@ export default {
orderBulkDisableEnable: `nakadai/nakadai/orderOther/orderBulkDisableEnable`,
exportSubscribedRecords: `nakadai/nakadai/order/exportSubscribedRecords`,
addNewCustomersByOneself: `nakadai/nakadai/school/addNewCustomersByOneself`,
exportClient: `${host}nakadai/nakadai/customer/exportClient`,
resetPwdCustomer: `nakadai/nakadai/customer/resetPwd`,
queryCustomerIsExists: `nakadai/nakadai/customer/queryCustomerIsExists`,

@ -1,6 +1,7 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -9,29 +10,51 @@
<div>
<el-form label-width="80px">
<el-col :span="4">
<el-form-item label="国家">
<el-select v-model="form.countries" placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option>
<el-form-item label="省份">
<el-select v-model="form.provinces"
clearable
placeholder="请选择省份"
@change="getCity"
@clear="clearprovince">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" @clear="clearprovince">
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
<el-form-item label="城市">
<el-select v-model="form.city"
clearable
placeholder="请选择城市"
:disabled="form.provinces ? false : true"
@change="initData">
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="initData">
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
<el-form-item label="客户类型">
<el-select v-model="form.customerType"
placeholder="请选择客户类型"
@change="initData">
<el-option v-for="(item,index) in customerTypeList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input placeholder="支持客户,联系人,账号搜索" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input>
<el-input placeholder="支持客户,联系人,账号搜索"
prefix-icon="el-icon-search"
v-model="form.keyword"
clearable></el-input>
</el-form-item>
</el-col>
</el-form>
@ -39,54 +62,111 @@
</div>
</el-card>
<el-card shadow="hover" class="card">
<el-card shadow="hover"
class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>客户列表</span>
</div>
<div>
<el-button type="primary" round class="mag" @click="addcustomer" v-auth>新增</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
<el-button type="primary"
round
class="mag"
@click="exportData">导出客户列表</el-button>
<el-button type="primary"
round
class="mag"
@click="addcustomer"
v-auth>新增</el-button>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
</div>
</div>
<el-table v-loading="loading" :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="customerId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<el-table v-loading="loading"
:data="listData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="customerId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope">
{{scope.$index + (page - 1) * pageSize + 1}}
</template>
</el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center">
<el-table-column prop="customerName"
label="客户名称"
align="center">
</el-table-column>
<el-table-column label="行业" align="center">
<el-table-column label="行业"
align="center">
<template slot-scope="scope">
<span class="ellipsis">{{scope.row.industryName}}</span>
</template>
</el-table-column>
<el-table-column prop="countries" label="国家" align="center">
<el-table-column prop="countries"
label="客户类型"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.customerType">{{ customerTypeList.find(e => e.value == scope.row.customerType).name }}</span>
</template>
</el-table-column>
<el-table-column prop="provinceName" label="省份" align="center">
<el-table-column prop="provinceName"
label="省份"
align="center">
</el-table-column>
<el-table-column prop="cityName" label="城市" align="center">
<el-table-column prop="cityName"
label="城市"
align="center">
</el-table-column>
<el-table-column prop="name" label="联系人" align="center">
<el-table-column prop="name"
label="联系人"
align="center">
</el-table-column>
<el-table-column prop="account" label="账号" align="center">
<el-table-column prop="account"
label="账号"
align="center">
</el-table-column>
<el-table-column prop="loginNumber" label="登录次数" align="center">
<el-table-column prop="loginNumber"
label="登录次数"
align="center">
</el-table-column>
<el-table-column label="操作" width="270" align="center">
<el-table-column label="操作"
width="270"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button>
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button>
<el-button type="text"
@click="resetPassword(scope.row)"
v-auth>重置密码</el-button>
<el-button type="text"
@click="show(scope.row)"
v-auth>查看</el-button>
<el-button type="text"
@click="edit(scope.row)"
v-auth>编辑</el-button>
<el-button type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
</el-card>
@ -95,18 +175,37 @@
<script>
import Setting from '@/setting'
import axios from 'axios';
import util from "@/libs/util";
export default {
name: 'customer',
data() {
data () {
return {
loading:false,
loading: false,
searchTimer: null,
countryList: [{
name:'中国'
name: '中国'
}],
customerTypeList: [
{
value: '',
name: '不限'
},
{
name: '正式',
value: 1
},
{
name: '试用',
value: 2
},
{
name: '到期',
value: 3
}],
listData: [],
form: {
countries:'中国',
customerType: '',
provinces: '',
city: '',
keyword: ''
@ -121,25 +220,25 @@ export default {
};
},
watch: {
'form.keyword': function(val) {
'form.keyword': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
},500)
}, 500)
},
},
mounted() {
mounted () {
this.getData()
this.getProvince()
},
methods: {
getData() {
getData () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
this.loading = true
this.$post(this.api.queryCustomer,{
countries: this.form.countries,
this.$post(this.api.queryCustomer, {
provinceId: this.form.provinces,
cityId: this.form.city,
customerType: this.form.customerType,
searchContent: this.form.keyword,
page: this.page,
size: this.pageSize,
@ -152,67 +251,94 @@ export default {
this.loading = false
})
},
initData(){
initData () {
this.page = 1
this.getData()
},
getProvince(){
getProvince () {
this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.list
this.$store.commit("provinceData", { provinceList : this.provinceList})
}).catch(res => {})
this.$store.commit("provinceData", { provinceList: this.provinceList })
}).catch(res => { })
},
clearprovince(){
clearprovince () {
this.form.city = ''
},
getCity(){
getCity () {
this.clearprovince()
this.getCityData()
this.page = 1
this.initData()
},
getCityData(){
getCityData () {
let data = {
provinceId: this.form.provinces
}
this.$get(this.api.queryCity,data).then(res => {
this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list
}).catch(res => {})
}).catch(res => { })
},
permission(row){
permission (row) {
this.$router.push(`/permission?name=${row.customerName}`)
},
addcustomer(){
//
async exportData () {
let sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
sid = (sid && !sid.all) ? sid.supplierId : ''
let list = this.multipleSelection
//
if (!list.length) {
const res = await this.$post(this.api.queryCustomer, {
page: 1,
size: 1000,
supplierId: sid
})
list = res.message.list
}
const ids = list.map(e => e.customerId)
axios.post(this.api.exportClient, {
exportCustomerIds: ids,
supplierId: sid
}, {
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`客户列表.xlsx`, new Blob([res.data]))
}).catch(res => { })
},
addcustomer () {
this.$router.push('addcustomer')
},
edit(row){
edit (row) {
this.$router.push(`addcustomer?id=${row.customerId}`)
},
show(row){
show (row) {
this.$router.push(`addcustomer?id=${row.customerId}&show=true`)
},
handleDelete(row) {
handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delCustomers,[row.customerId]).then(res => {
this.$post(this.api.delCustomers, [row.customerId]).then(res => {
this.$message.success('删除成功')
if(this.listData.length == 2){
if (this.listData.length == 2) {
}else{
if(this.page > 1){
this.page = this.page-1
} else {
if (this.page > 1) {
this.page = this.page - 1
}
}
this.getData()
}).catch(res => {})
}).catch(() => {})
}).catch(res => { })
}).catch(() => { })
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val
},
delAllSelection() {
if(this.multipleSelection.length != ''){
delAllSelection () {
if (this.multipleSelection.length != '') {
let arr = this.multipleSelection
let delList = arr.map(item => {
return item.customerId
@ -220,40 +346,40 @@ export default {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.delCustomers,delList).then(res => {
this.$post(this.api.delCustomers, delList).then(res => {
this.multipleSelection = [];
if(delList.length == this.listData.length){
if(this.page > 1){
this.page = this.page-1
if (delList.length == this.listData.length) {
if (this.page > 1) {
this.page = this.page - 1
}
}
this.$refs.table.clearSelection()
this.$message.success('删除成功')
this.getData()
}).catch(res => {})
}).catch(() => {})
}else{
}).catch(res => { })
}).catch(() => { })
} else {
this.$message.error('请先选择数据')
}
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.page = val
this.$store.commit('SET_C_PAGE', val)
this.$router.push(`customer?page=${val}`)
this.getData()
},
resetPassword(row){
resetPassword (row) {
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => {
this.$get(this.api.resetPwdCustomer,{
this.$get(this.api.resetPwdCustomer, {
customerId: row.customerId,
}).then(res => {
if(res.message == 'success'){
if (res.message == 'success') {
this.$message.success('重置成功')
}else{
} else {
this.$message.error('重置失败')
}
}).catch(res => {});
}).catch(res => { });
}).catch(() => {
});
},

@ -172,7 +172,13 @@ export default {
}).then(({ page }) => {
const list = page.records
this.curriculumList = page.records
if (!this.form.mallId && list.length) this.form.mallId = list[0].mallId
if (list.length) {
const { mallId, cid, systemId } = this.form
const first = list[0]
this.form.mallId = mallId || first.mallId
this.form.cid = cid || +first.associatedProduct
this.sysId = systemId || +first.systemId
}
this.courseChange()
}).catch(err => {

@ -1,111 +1,157 @@
<template>
<div class="wrap">
<el-card shadow="hover" class="m-b-20">
<el-page-header @back="$router.back()" content="查看报告"></el-page-header>
<el-card shadow="hover"
class="m-b-20">
<el-page-header @back="$router.back()"
content="查看报告"></el-page-header>
</el-card>
<div class="content">
<div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button>
<el-button type="primary"
@click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
<h6 class="l-title">
<img src="@/assets/img/info1.png" alt="">
<img src="@/assets/img/info1.png"
alt="">
基本信息
</h6>
<ul :class="['info-list', {edit: editing}]">
<li>
<label>学生姓名</label>
<el-input v-if="editing" v-model="infoData.userName" disabled></el-input>
<el-input v-if="editing"
v-model="infoData.userName"
disabled></el-input>
<span v-else>{{ infoData.userName }}</span>
</li>
<li>
<label>学生学号</label>
<el-input v-if="editing" v-model="infoData.workNumber" disabled></el-input>
<el-input v-if="editing"
v-model="infoData.workNumber"
disabled></el-input>
<span v-else>{{ infoData.workNumber }}</span>
</li>
<li>
<label>实验时间</label>
<el-input v-if="editing" v-model="infoData.submitTime" disabled></el-input>
<el-input v-if="editing"
v-model="infoData.submitTime"
disabled></el-input>
<span v-else>{{ infoData.submitTime }}</span>
</li>
<li>
<label>实验成绩</label>
<el-input v-if="editing" v-model="infoData.score" disabled></el-input>
<div v-else class="score-wrap">
<el-input v-if="editing"
v-model="infoData.score"
disabled></el-input>
<div v-else
class="score-wrap">
<em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png" alt="">
<img src="@/assets/img/point.png"
alt="">
</div>
</li>
<li>
<label>学生班级</label>
<el-input v-if="editing" v-model="infoData.className"></el-input>
<el-input v-if="editing"
v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span>
</li>
<li>
<label>指导老师</label>
<el-input v-if="editing" v-model="infoData.instructor"></el-input>
<el-input v-if="editing"
v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span>
</li>
<li>
<label>实验学时</label>
<el-input v-if="editing" v-model="infoData.period"></el-input>
<el-input v-if="editing"
v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span>
</li>
</ul>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report2.png" alt="">
<img src="@/assets/img/report2.png"
alt="">
实验项目名称
</h6>
<el-input v-if="editing" v-model="form.projectName" type="textarea"></el-input>
<div v-else class="pre-wrap" v-html="form.projectName"></div>
<el-input v-if="editing"
v-model="form.projectName"
type="textarea"></el-input>
<div v-else
class="pre-wrap"
v-html="form.projectName"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report3.png" alt="">
<img src="@/assets/img/report3.png"
alt="">
实验目的
</h6>
<div :class="['pre-wrap', {edit: editing}]" v-html="form.purpose"></div>
<div :class="['pre-wrap', {edit: editing}]"
v-html="form.purpose"></div>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report4.png" alt="">
<img src="@/assets/img/report4.png"
alt="">
实验数据
</h6>
<el-table :data="expData" class="table" border stripe header-align="center">
<el-table-column type="index" label="序号" align="center" width="60">
<el-table :data="expData"
class="table"
border
stripe
header-align="center">
<el-table-column type="index"
label="序号"
align="center"
width="60">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="judgmentName" label="判分点" width="270" align="center"></el-table-column>
<el-table-column v-if='project' prop="judgmentName" label="考核点" align="center" width="150">
<el-table-column prop="judgmentName"
label="判分点"
width="270"
align="center"></el-table-column>
<el-table-column v-if='project'
prop="judgmentName"
label="考核点"
align="center"
width="150">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span>
<span>{{index+1}}. </span>{{item.name}}
</span>
</div>
</template>
</el-table-column>
<el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'>
<el-table-column prop="ruleAnswer"
label="参考答案"
style='word-wrap: break-word'>
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span>
<span>{{index+1}}. </span>{{item.ruleAnswer}}
</span>
</div>
</div>
<div v-else v-html="scope.row.referenceAnswer"></div>
<div v-else
v-html="scope.row.referenceAnswer"></div>
</template>
</el-table-column>
<el-table-column prop="userAnswer" label="学生答案">
<el-table-column prop="userAnswer"
label="学生答案">
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
@ -114,22 +160,39 @@
</span>
</div>
</div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div>
<div v-else
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" :src="img" alt="">
<img v-for="(img, i) in scope.row.runThePictureList"
:key="i"
width="200"
class="result-pic"
:src="img"
alt="">
</template>
</template>
</el-table-column>
<el-table-column prop="score" label="得分" width="80" align="center"></el-table-column>
<el-table-column prop="score"
label="得分"
width="80"
align="center"></el-table-column>
</el-table>
</div>
<div class="m-b-20">
<h6 class="l-title">
<img src="@/assets/img/report5.png" alt="">
<img src="@/assets/img/report5.png"
alt="">
实验总结与体会
</h6>
<quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" />
<div v-else class="pre-wrap" v-html="form.summarize"></div>
<quill v-if="editing"
:border="true"
v-model="form.summarize"
:minHeight="150"
:height="150" />
<div v-else
class="pre-wrap"
v-html="form.summarize"></div>
</div>
</div>
</div>
@ -139,7 +202,7 @@
<script>
import util from "@/libs/util";
export default {
data() {
data () {
return {
reportId: this.$route.query.reportId,
title: "实验报告",
@ -155,15 +218,15 @@ export default {
editing: false,
loadIns: null,
loading: false,
project:false,
project: false,
userScores: []
};
},
mounted() {
mounted () {
this.getData()
},
methods: {
getData() { //
getData () { //
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
this.form = report
this.expData = userScores
@ -177,6 +240,7 @@ export default {
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
className: form.className,
userName: form.userName
}
const data = report.data
@ -187,14 +251,14 @@ export default {
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => {}).catch(err => {})
}).then(res => { }).catch(err => { })
} else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
}
}).catch(res => {})
}).catch(res => { })
},
//
handleList(list) {
handleList (list) {
this.project = list.find(e => e.lcRuleRecords) // lcRuleRecords
if (this.project) {
list.map(e => {
@ -215,7 +279,7 @@ export default {
}
this.expData = list
},
exportPage() {
exportPage () {
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
@ -235,8 +299,8 @@ export default {
experimentalData: list
}).then(res => {
console.log(res)
util.downloadFileDirect(`实验报告.docx`,new Blob([res]))
}).catch(res => {})
util.downloadFileDirect(`实验报告.docx`, new Blob([res]))
}).catch(res => { })
},
}
};
@ -249,22 +313,24 @@ export default {
.text-right {
text-align: right;
}
code, kbd, samp{
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
code,
kbd,
samp {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
word-wrap: break-word;
white-space: pre-wrap;
}
/deep/ pre{
/deep/ pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break:break-all;
overflow:hidden;
word-break: break-all;
overflow: hidden;
font-size: 12px;
font-weight:400;
font-family:'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif
font-weight: 400;
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
}
.content {
padding: 16px 40px;
@ -280,7 +346,7 @@ code, kbd, samp{
}
.info {
padding: 20px 16px;
border: 1px solid #E1E6F2;
border: 1px solid #e1e6f2;
}
.l-title {
display: flex;
@ -314,7 +380,7 @@ code, kbd, samp{
span {
min-width: 150px;
padding: 0 10px 3px;
border-bottom: 1px solid #E1E6F2;
border-bottom: 1px solid #e1e6f2;
}
/deep/.el-input {
width: 174px;
@ -323,7 +389,7 @@ code, kbd, samp{
.score-wrap {
position: relative;
min-width: 150px;
border-bottom: 1px solid #E1E6F2;
border-bottom: 1px solid #e1e6f2;
em {
position: absolute;
top: -12px;
@ -331,7 +397,7 @@ code, kbd, samp{
font-family: din;
font-size: 30px;
font-weight: 600;
color: #0B1D30;
color: #0b1d30;
}
img {
position: absolute;
@ -339,16 +405,17 @@ code, kbd, samp{
left: 0;
}
}
/deep/.el-textarea .el-textarea__inner, .pre-wrap {
/deep/.el-textarea .el-textarea__inner,
.pre-wrap {
min-height: 72px;
padding: 10px 16px;
font-size: 14px;
color: #333;
&.edit {
color: #ABB3C6;
border: 1px solid #CACFDB;
color: #abb3c6;
border: 1px solid #cacfdb;
border-radius: 4px;
background-color: #F6F7F9;
background-color: #f6f7f9;
}
}
/deep/ .table th {

@ -4,54 +4,58 @@
<div class="side">
<div>
<div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">城市合伙人区域管理</h6>
<h6 class="p-title"
style="margin-bottom: 0">城市合伙人区域管理</h6>
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">
<el-tree
:data="orgList"
<el-tree :data="orgList"
default-expand-all
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 }">
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span>
</span>
</el-tree>
</div>
</div>
<el-dialog
:title="typeForm.id ? '编辑' : '新增' + '分类'"
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'"
: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-item label="分类名称" prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input>
@close="closeType">
<el-form v-if="orgVisible"
ref="typeForm"
:model="typeForm"
:rules="orgRules"
label-width="100px">
<el-form-item label="分类名称"
prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName"
placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="上级部门">
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span>
<el-cascader
v-else
<el-cascader v-else
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%"
>
style="width: 100%">
</el-cascader>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="closeOrg"> </el-button>
<el-button type="primary" @click="orgSubmit"> </el-button>
<el-button type="primary"
@click="orgSubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -66,51 +70,117 @@
</ul>
</div> -->
<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="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="teamName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="userName" 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="account" label="账号" align="center" min-width="100"></el-table-column>
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="phone" label="团队年费" align="center" min-width="120">
<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="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="teamName"
label="团队名称"
align="center"
min-width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="userName"
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="account"
label="账号"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="invitationAccount"
label="邀请人"
align="center"
min-width="120"></el-table-column>
<el-table-column prop="phone"
label="团队年费"
align="center"
min-width="120">
<template slot-scope="scope">
固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + 'w' : '' }}
<el-button v-auth="'/parner:费率管理:修改固定年费'" type="primary" size="mini" @click="editAnnualTeamFee(scope.row)">修改</el-button>
固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + '元' : '' }}
<el-button v-auth="'/parner:费率管理:修改固定年费'"
type="primary"
size="mini"
@click="editAnnualTeamFee(scope.row)">修改</el-button>
</template>
</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">
项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }}
<el-button v-auth="'/parner:费率管理:修改项目抽成'" type="primary" size="mini" @click="editAnnualMarketingFee(scope.row)">修改</el-button>
<el-button v-auth="'/parner:费率管理:修改项目抽成'"
type="primary"
size="mini"
@click="editAnnualMarketingFee(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<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>
<el-dialog title="请设置团队年费" :visible.sync="annualTeamFeeVisible" width="300px" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="75px" style='margin-right: 0;'>
<el-dialog title="请设置团队年费"
:visible.sync="annualTeamFeeVisible"
width="300px"
class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="75px"
style='margin-right: 0;'>
<el-form-item label="固定年费">
<el-input style="width: 150px;" type="number" v-model.number="annualTeamFee" placeholder="请输入数字"></el-input>
<el-input style="width: 150px;"
type="number"
v-model.number="annualTeamFee"
placeholder="请输入数字"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="annualTeamFeeVisible = false">取消</el-button>
<el-button type="primary" @click="submitAnnualTeamFee">确定</el-button>
<el-button type="primary"
@click="submitAnnualTeamFee">确定</el-button>
</span>
</el-dialog>
<el-dialog title="请设置市场服务年费" :visible.sync="annualMarketingFeeVisible" width="300px" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="75px" style='margin-right: 0;'>
<el-dialog title="请设置市场服务年费"
:visible.sync="annualMarketingFeeVisible"
width="300px"
class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="75px"
style='margin-right: 0;'>
<el-form-item label="项目抽成">
<el-input style="width: 150px;" type="number" v-model.number="annualMarketingFee" placeholder="请输入数字"></el-input> %
<el-input style="width: 150px;"
type="number"
v-model.number="annualMarketingFee"
placeholder="请输入数字"></el-input> %
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="annualMarketingFeeVisible = false">取消</el-button>
<el-button type="primary" @click="submitAnnualMarketingFee">确定</el-button>
<el-button type="primary"
@click="submitAnnualMarketingFee">确定</el-button>
</span>
</el-dialog>
</div>
@ -125,7 +195,7 @@ import clipboard from '@/libs/clipboard'
import axios from 'axios'
export default {
components: { OrgTree },
data() {
data () {
return {
accountId: this.$store.state.accountId,
userName: this.$store.state.userName,
@ -185,17 +255,17 @@ export default {
};
},
watch: {
keyWord: function(val) {
keyWord: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(this.initData, 500);
}
},
mounted() {
mounted () {
this.getOrg()
},
methods: {
//
async getOrg() {
async getOrg () {
const res = await this.$post(this.api.listParner)
const list = res.treeList
// children
@ -222,13 +292,13 @@ export default {
this.getList()
},
//
typeChange() {
typeChange () {
this.$refs.orgTree.setCurrentKey(null)
this.curTeamId = ''
this.initData()
},
//
addOrg(node, data) {
addOrg (node, data) {
const list = JSON.parse(JSON.stringify(this.orgList))
this.handleOrg(list)
this.orgListDia = list
@ -243,7 +313,7 @@ export default {
this.orgVisible = true
},
//
editOrg(node, data) {
editOrg (node, data) {
const list = JSON.parse(JSON.stringify(this.orgList))
this.handleOrg(list)
this.orgListDia = list
@ -258,14 +328,14 @@ export default {
this.cascaderValue = ids
},
//
closeType() {
closeType () {
this.typeForm = {
id: '',
partnerClassificationName: ''
}
},
//
handleOrg(list) {
handleOrg (list) {
for (const i in list) {
const e = list[i]
//
@ -277,18 +347,18 @@ export default {
}
},
//
delOrg(node, data) {
delOrg (node, data) {
this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => {
util.successMsg("删除成功")
this.getOrg()
}).catch(res => {})
}).catch(() => {})
}).catch(res => { })
}).catch(() => { })
},
// /
orgSubmit() {
orgSubmit () {
this.$refs.typeForm.validate((valid) => {
if (valid) {
const form = this.typeForm
@ -303,20 +373,20 @@ export default {
this.$post(this.api.saveParner, form).then(res => {
util.successMsg("新增成功!")
this.closeOrg()
}).catch(err => {})
}).catch(err => { })
} else {
//
this.$post(this.api.updateParner, form).then(res => {
util.successMsg("编辑成功!")
this.setKey = form.id
this.closeOrg()
}).catch(err => {})
}).catch(err => { })
}
}
});
},
// id
getTeamId(list) {
getTeamId (list) {
for (const i in list) {
const e = list[i]
if (e.isTeam && !this.curTeamId) {
@ -328,7 +398,7 @@ export default {
}
},
//
handleNodeClick(data) {
handleNodeClick (data) {
this.type = ''
this.curTeamId = ''
if (data.isTeam) {
@ -341,18 +411,18 @@ export default {
this.$refs.table.clearSelection()
},
//
closeOrg() {
closeOrg () {
this.orgVisible = false
this.cascaderValue = []
this.getOrg()
},
//
getAll() {
getAll () {
this.curTeamId = ''
this.getList()
},
//
getList() {
getList () {
this.$post(this.api.teamPartnerList, {
type: this.type || 1,
partnerClassificationId: this.curTeamId,
@ -367,29 +437,29 @@ export default {
console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData)
this.total = pageList.total
}).catch(err => {})
}).catch(err => { })
},
//
currentChange(val) {
currentChange (val) {
this.page = val
this.getList()
},
handleSelectionChange(val) { //
handleSelectionChange (val) { //
this.multipleSelection = val
},
initData() {
initData () {
this.$refs.table.clearSelection()
this.page = 1
this.getList()
},
//
editAnnualTeamFee(row) {
editAnnualTeamFee (row) {
this.curRow = row
this.annualTeamFee = row.annualTeamFee
this.annualTeamFeeVisible = true
},
//
submitAnnualTeamFee() {
submitAnnualTeamFee () {
this.$post(this.api.editPartnerTeamRates, {
annualTeamFee: this.annualTeamFee,
annualMarketingFee: this.curRow.annualMarketingFee,
@ -399,16 +469,16 @@ export default {
this.annualTeamFeeVisible = false
util.successMsg('修改成功')
this.getList()
}).catch(res => {})
}).catch(res => { })
},
//
editAnnualMarketingFee(row) {
editAnnualMarketingFee (row) {
this.curRow = row
this.annualMarketingFee = row.annualMarketingFee
this.annualMarketingFeeVisible = true
},
//
submitAnnualMarketingFee() {
submitAnnualMarketingFee () {
this.$post(this.api.editPartnerTeamRates, {
annualMarketingFee: this.annualMarketingFee,
annualTeamFee: this.curRow.annualTeamFee,
@ -418,7 +488,7 @@ export default {
this.annualMarketingFeeVisible = false
util.successMsg('修改成功')
this.getList()
}).catch(res => {})
}).catch(res => { })
},
}
};

@ -1,19 +1,25 @@
<template>
<div ref="main" class="main">
<div ref="main"
class="main">
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between">
<el-page-header @back="back" content="项目配置"></el-page-header>
<el-page-header @back="back"
content="项目配置"></el-page-header>
<div v-if="!isDetail">
<el-button type="success" @click="handleSubmit(0,projectManage.isOpen=1,projectManage.ztOpen = 1)">保存为草稿
<el-button type="success"
@click="handleSubmit(0,projectManage.isOpen=1,projectManage.ztOpen = 1)">保存为草稿
</el-button>
<el-button type="primary" @click="handleSubmit(1)">确定并发布</el-button>
<el-button type="primary"
@click="handleSubmit(1)">确定并发布</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-center mgb20">
<p class="addhr_tag"></p>
<span>课程信息</span>
@ -24,18 +30,26 @@
<el-form label-width="80px">
<div style="display: flex">
<el-form-item label="项目名称">
<el-input :disabled="isDetail" v-model.trim="projectManage.projectName"
placeholder="20个字符以内" @blur="projectNameExistis"></el-input>
<el-input :disabled="isDetail"
v-model.trim="projectManage.projectName"
placeholder="20个字符以内"
@blur="projectNameExistis"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model.trim="projectManage.remark" placeholder="20个字符以内"></el-input>
<el-input v-model.trim="projectManage.remark"
placeholder="20个字符以内"></el-input>
</el-form-item>
<el-form-item label="项目权限">
<el-select :disabled="isDetail" v-model="projectManage.permissions"
placeholder="请选择" @change="permissionChange">
<el-option label="练习" :value="0"></el-option>
<el-option label="考核" :value="1"></el-option>
<el-option label="竞赛" :value="2"></el-option>
<el-form-item label="项目用途">
<el-select :disabled="isDetail"
v-model="projectManage.permissions"
placeholder="请选择"
@change="permissionChange">
<el-option label="练习"
:value="0"></el-option>
<el-option label="考核"
:value="1"></el-option>
<el-option label="竞赛"
:value="2"></el-option>
</el-select>
</el-form-item>
</div>
@ -43,7 +57,8 @@
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-center mgb20">
<p class="addhr_tag"></p>
<span>实验目标</span>
@ -52,14 +67,18 @@
<div>
<el-form label-width="0">
<el-form-item>
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentTarget"
:minHeight="150" :height="150" />
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentTarget"
:minHeight="150"
:height="150" />
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-center mgb20">
<p class="addhr_tag"></p>
<span>项目背景</span>
@ -68,21 +87,27 @@
<div>
<el-form label-width="0">
<el-form-item>
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription"
:minHeight="150" :height="150" />
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentDescription"
:minHeight="150"
:height="150" />
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="addhr_tag"></p>
<span>实验任务</span>
</div>
<div>
<el-button :disabled="isDetail" type="primary" @click="toJudgePoint('home')">进入判分点
<el-button :disabled="isDetail"
type="primary"
@click="toJudgePoint('home')">进入判分点
</el-button>
</div>
</div>
@ -90,63 +115,101 @@
<div class="mgb20 flex-between">
<div class="flex-center">
<div class="m-r-20" style="color: #f00">项目总分值100</div>
<div class="m-r-20"
style="color: #f00">项目总分值100</div>
<!-- <div>权重&emsp;<div class="dib"><el-input></el-input></div></div> -->
</div>
<div>
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="avgDistributionScore">
<el-button :disabled="isDetail"
class="m-r-20"
type="text"
@click="avgDistributionScore">
平均分配分值
</el-button>
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore">
<el-button :disabled="isDetail"
class="m-r-20"
type="text"
@click="manualDistributionScore">
手动分配分值
</el-button>
<span>(待分配分值: {{ handDistributionScore }}/100)</span>
</div>
</div>
<el-button :disabled="isDetail" type="primary" icon="el-icon-plus" round
@click="handleAddJudgment" style="margin-bottom: 10px">判分点
<el-button :disabled="isDetail"
type="primary"
icon="el-icon-plus"
round
@click="handleAddJudgment"
style="margin-bottom: 10px">判分点
</el-button>
<el-button :disabled="isDetail" type="primary" icon="el-icon-delete" round
@click="batchDeleteProjectJudgment" style="margin-bottom: 10px">批量删除
<el-button :disabled="isDetail"
type="primary"
icon="el-icon-delete"
round
@click="batchDeleteProjectJudgment"
style="margin-bottom: 10px">批量删除
</el-button>
<div class="draggable">
<el-table
ref="projectJudgementTable"
<el-table ref="projectJudgementTable"
:data="projectJudgmentData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionProjectJudgment"
row-key="judgmentId"
v-loading="listLoading"
>
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="sort" label="序号" width="80" align="center">
v-loading="listLoading">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column prop="sort"
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.sort }}
</template>
</el-table-column>
<el-table-column prop="name" label="判分指标" align="center"></el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column label="实验要求" align="center" width="600">
<el-table-column prop="name"
label="判分指标"
align="center"></el-table-column>
<el-table-column prop="name"
label="判分点名称"
align="center"></el-table-column>
<el-table-column label="实验要求"
align="center"
width="600">
<template slot-scope="scope">
<quill :border="true" :readonly="true" elseRead="true"
v-model="scope.row.experimentalRequirements" :minHeight="100"
<quill :border="true"
:readonly="true"
elseRead="true"
v-model="scope.row.experimentalRequirements"
:minHeight="100"
:height="100" />
</template>
</el-table-column>
<el-table-column prop="score" label="分数" align="center" width="120">
<el-table-column prop="score"
label="分数"
align="center"
width="120">
<template slot-scope="scope">
<!--type="number" @blur="updateProjectJudgment"-->
<el-input :disabled="isDetail" v-model.trim="scope.row.score"
<el-input :disabled="isDetail"
v-model.trim="scope.row.score"
@input="scoreChange(scope.row, scope.$index,$event)"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="140" align="center">
<el-table-column label="操作"
width="140"
align="center">
<template slot-scope="scope">
<el-button :disabled="isDetail" type="text" style="margin-right: 10px" @click="toJudgePoint('edit', scope.row)">自定义</el-button>
<el-button :disabled="isDetail" type="text" @click="delJudgePoint(scope.$index)">
<el-button :disabled="isDetail"
type="text"
style="margin-right: 10px"
@click="toJudgePoint('edit', scope.row)">自定义</el-button>
<el-button :disabled="isDetail"
type="text"
@click="delJudgePoint(scope.$index)">
删除
</el-button>
</template>
@ -155,7 +218,8 @@
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="addhr_tag"></p>
@ -163,16 +227,22 @@
</div>
<div>
启用
<el-switch :disabled="isDetail" :active-value="0" :inactive-value="1"
<el-switch :disabled="isDetail"
:active-value="0"
:inactive-value="1"
v-model="projectManage.hintOpen"></el-switch>
</div>
</div>
<div class="border-b-dashed"></div>
<div>
<el-form label-width="0">
<el-form-item prop="tips" label="">
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint"
:minHeight="150" :height="150" />
<el-form-item prop="tips"
label="">
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentHint"
:minHeight="150"
:height="150" />
</el-form-item>
</el-form>
</div>
@ -181,15 +251,21 @@
</el-row>
<!--选择判分点对话框-->
<el-dialog title="添加判分点" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false" @close="closeJudgment">
<el-dialog title="添加判分点"
:visible.sync="dialogVisible"
width="40%"
:close-on-click-modal="false"
@close="closeJudgment">
<div class="text-right mgb10">
<div>
<el-input placeholder="请输入需要查找的判分点" prefix-icon="el-icon-search" v-model.trim="judgementpointsquery" clearable></el-input>
<el-input placeholder="请输入需要查找的判分点"
prefix-icon="el-icon-search"
v-model.trim="judgementpointsquery"
clearable></el-input>
</div>
</div>
<el-table
v-loading="visibleLoading"
<el-table v-loading="visibleLoading"
:data="judgementData"
ref="judgementTable"
class="table"
@ -197,24 +273,36 @@
header-align="center"
max-height="400"
@selection-change="handleSelectionJudgment"
:row-key="rowKey"
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="序号" align="center" width="100">
:row-key="rowKey">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column prop="id"
label="序号"
align="center"
width="100">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="100">
<el-table-column prop="name"
label="判分点名称"
align="center"></el-table-column>
<el-table-column label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button size="mini" @click="toJudgePoint('view', scope.row)">查看</el-button>
<el-button size="mini"
@click="toJudgePoint('view', scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<div slot="footer"
class="dialog-footer">
<el-button @click="closeJudgment"> </el-button>
<el-button type="primary" @click="saveJudgment"> </el-button>
<el-button type="primary"
@click="saveJudgment"> </el-button>
</div>
</el-dialog>
</div>
@ -229,18 +317,18 @@ export default {
components: {
quill
},
data() {
data () {
return {
projectId: this.$route.query.projectId,
founder: this.$route.query.founder,
token: btoa(sessionStorage.getItem("token")),
isDetail: this.$route.query.show,
isDetails:this.$route.query.isDetails,
isDetails: this.$route.query.isDetails,
projectManage: {
founder: 0, // (0 1)
projectName: "", //
remark: '',
permissions: 0, // (0 1 2)
permissions: 0, // (0 1 2)
systemId: this.$route.query.systemId, // id
hintOpen: 1, // (0 1 1)
experimentHint: "", //
@ -252,7 +340,7 @@ export default {
isDel: 0 // (0 1 0)
},
projectJudgmentData: [], //()
oriPer: '', //
oriPer: '', //
selectedProjectJudgment: [], //
dialogVisible: false, //
@ -269,19 +357,19 @@ export default {
searchTimer: null,
isToPoint: false, //
visibleLoading: false, //
listLoading:false,//
listLoading: false,//
submiting: false, //
updateTime: 0
};
},
computed: {
lastSystemId() {
lastSystemId () {
return this.$store.state.lastSystemId;
},
projectFields() {
projectFields () {
return this.$store.state.projectFields;
},
handDistributionScore: function() {
handDistributionScore: function () {
//100
let score = 0;
this.projectJudgmentData.forEach(e => {
@ -299,19 +387,19 @@ export default {
watch: {
// ,
projectManage: {
handler(){
handler () {
this.updateTime++
},
deep:true
deep: true
},
judgementpointsquery(n) {
judgementpointsquery (n) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.handleQueryJudgment();
}, 500);
}
},
mounted() {
mounted () {
if (this.$route.query.projectId) {
this.projectId = this.$route.query.projectId;
this.getInfoData();
@ -325,20 +413,20 @@ export default {
this.rowDrop();
this.$refs.main.scrollTop = 0;
},
beforeDestroy() {
beforeDestroy () {
if (!this.isToPoint) {
this.$store.dispatch("setProject", {});
}
},
methods: {
permissionChange(){
if (this.projectManage.permissions){
permissionChange () {
if (this.projectManage.permissions) {
this.projectManage.hintOpen = 1
}else{
} else {
this.projectManage.hintOpen = 0
}
},
getInfoData() { //
getInfoData () { //
if (!this.isToPoint) {
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res;
@ -358,7 +446,7 @@ export default {
});
}
},
projectNameExistis() { //
projectNameExistis () { //
const { projectName } = this.projectManage
if (this.originName === projectName) {
this.projectNameRepeat = false
@ -372,7 +460,7 @@ export default {
})
}
},
systemChange() { //
systemChange () { //
if (this.projectJudgmentData.length) {
this.$confirm("更换系统会清空实验任务,确认更换?", "提示", {
type: "warning"
@ -386,10 +474,10 @@ export default {
}
},
//
removeTag(val) {
removeTag (val) {
return val.replace('<p><br></p>', '')
},
judgmentRelease(state) { //
judgmentRelease (state) { //
let {
projectName,
experimentTarget,
@ -433,7 +521,7 @@ export default {
}
return true;
},
handleSubmit(state) { //
handleSubmit (state) { //
if (this.submiting) return false
if (!this.judgmentRelease(state)) { //
return;
@ -473,14 +561,14 @@ export default {
}
}
},
updateProject(params) { //
updateProject (params) { //
this.$post(this.api[params.projectManage.state ? 'updateProjectManage' : 'editProjectDraft'], params).then(res => {
if (res.status === 200) {
//
//
if (!params.projectManage.founder && this.oriPer !== params.projectManage.permissions) {
this.$get(`${this.api.checkConfig}?projectId=${this.projectId}`).then(res => {
this.$message.success(res.message === 'success' ? '更新实验项目成功' : res.message)
}).catch(err => {})
}).catch(err => { })
} else {
this.$message.success('更新实验项目成功')
}
@ -490,7 +578,7 @@ export default {
this.submiting = false
});
},
addProject(params) { //
addProject (params) { //
this.$post(this.api[params.projectManage.state ? 'addProjectManage' : 'saveProjectDraft'], params).then(res => {
if (res.status === 200) {
this.$message.success("添加实验项目成功");
@ -500,10 +588,10 @@ export default {
this.submiting = false
});
},
manualDistributionScore() { //
manualDistributionScore () { //
},
avgDistributionScore() {
avgDistributionScore () {
//
if (this.projectJudgmentData.length) {
this.$get(this.api.avgValues, {
@ -519,20 +607,20 @@ export default {
});
}
},
handleMoveUp(index) { // ()
handleMoveUp (index) { // ()
let x = index;
let y = index + 1;
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 1]));
},
handleMoveDown(index) { // ()
handleMoveDown (index) { // ()
let x = index + 1;
let y = index + 2;
this.projectJudgmentData.splice(x - 1, 1, ...this.projectJudgmentData.splice(y - 1, 1, this.projectJudgmentData[x - 1]));
},
scoreChange(row, index) { //
scoreChange (row, index) { //
this.projectJudgmentData.splice(index, 1, row);
},
delJudgePoint(index) { //
delJudgePoint (index) { //
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
@ -540,10 +628,10 @@ export default {
}).catch(() => {
});
},
handleSelectionProjectJudgment(val) {
handleSelectionProjectJudgment (val) {
this.selectedProjectJudgment = val;
},
batchDeleteProjectJudgment() { //
batchDeleteProjectJudgment () { //
if (this.selectedProjectJudgment.length) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
@ -561,11 +649,11 @@ export default {
this.$message.error("请选择判分点");
}
},
handleAddJudgment() { //
handleAddJudgment () { //
this.dialogVisible = true;
this.handleQueryJudgment();
},
handleQueryJudgment() { //
handleQueryJudgment () { //
let { systemId } = this.projectManage;
this.$nextTick(() => {
this.$refs.judgementTable.clearSelection();
@ -574,7 +662,7 @@ export default {
name: this.judgementpointsquery,
pageNum: 1,
pageSize: 10000,
enable:0,
enable: 0,
systemId
};
if (systemId == 2 || systemId == 3) {
@ -589,7 +677,7 @@ export default {
this.getProgrammingClassData(params);
}
},
getProcessClassData(params) { //
getProcessClassData (params) { //
this.visibleLoading = true;
this.$post(`${this.api.getLcJudgmentPoint}`, params).then(res => {
if (res.status === 200) {
@ -606,7 +694,7 @@ export default {
this.visibleLoading = false
});
},
getProgrammingClassData(params) { //
getProgrammingClassData (params) { //
this.visibleLoading = true;
this.$post(this.api.getBcJudgmentPoint, params).then(res => {
if (res.status === 200) {
@ -623,14 +711,14 @@ export default {
this.visibleLoading = false
});
},
handleSelectionJudgment(val) { //
handleSelectionJudgment (val) { //
this.selectedJudgment = val;
},
closeJudgment() { //
closeJudgment () { //
this.judgementpointsquery = "";
this.dialogVisible = false;
},
saveJudgment() { //
saveJudgment () { //
if (this.selectedJudgment.length) {
this.judgementpointsquery = "";
this.dialogVisible = false;
@ -650,14 +738,14 @@ export default {
}
},
//
rowDrop() {
rowDrop () {
//
const tbody = document.querySelector(".draggable .el-table__body-wrapper tbody");
const _this = this;
Sortable.create(tbody, {
//
draggable: ".draggable .el-table__row",
onEnd({ newIndex, oldIndex }) {
onEnd ({ newIndex, oldIndex }) {
// : vue$nextTick
_this.projectJudgmentData.splice(newIndex, 0, _this.projectJudgmentData.splice(oldIndex, 1)[0]);
let newArray = _this.projectJudgmentData.slice(0);
@ -674,7 +762,7 @@ export default {
});
},
//
async updateProjectJudgment() {
async updateProjectJudgment () {
let param = this.projectJudgmentData.map((e, i) => {
let obj = {
judgmentId: e.judgmentId,
@ -704,14 +792,14 @@ export default {
console.log(err);
});
},
handleCacheData() { //
handleCacheData () { //
this.isToPoint = true;
this.$store.dispatch("setProject", {
projectManage: this.projectManage,
projectJudgmentData: this.projectJudgmentData
});
},
toJudgePoint(type, row) { //
toJudgePoint (type, row) { //
this.handleCacheData();
let jumpPath = Setting.jumpPath;
let { systemId } = this.projectManage;
@ -753,13 +841,13 @@ export default {
location.href = href;
},
//
toList() {
toList () {
this.$router.back()
},
//
back() {
back () {
//
if(this.updateTime){
if (this.updateTime) {
this.$confirm('编辑的内容未保存,是否保存?', "提示", {
type: "warning"
}).then(() => {
@ -781,9 +869,9 @@ export default {
padding: 0;
border-bottom: 0;
}
.main{
.main {
overflow: auto;
overflow-x: hidden;
height: calc(100vh - 152px );
height: calc(100vh - 152px);
}
</style>

@ -44,7 +44,7 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="权限">
<el-form-item label="用途">
<el-select v-model="queryData.permissions"
placeholder="请选择"
@change="initData">
@ -120,7 +120,7 @@
{{ queryData.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template>
</el-table-column>
<el-table-column label="权限"
<el-table-column label="用途"
min-width="120"
align="center">
<template slot-scope="scope">
@ -208,7 +208,7 @@ export default {
platformId: 3, // :1 :3
founder: 0, // (0: 1:)
state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:)
permissions: "", // (0: 1: 2:)
},
keyword: '',
status: '',

@ -306,7 +306,8 @@
:offset="5">
<el-form-item class="req"
label="市场建议单价"
prop="briefIntroduction">
prop="briefIntroduction"
label-width="120px">
<el-input type="number"
style="width: 250px"
placeholder="请输入市场建议单价"

Loading…
Cancel
Save