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 () { getUserInfo () {
this.$get(this.api.queryUserInfoDetails).then(({ result }) => { this.$get(this.api.queryUserInfoDetails).then(({ result }) => {
this.initSocket(result.userAccount)
let userInfo = result.hrUserInfo let userInfo = result.hrUserInfo
if (userInfo.userAvatars) this.$store.commit('userAvatar', { avatar: userInfo.userAvatars }) if (userInfo.userAvatars) this.$store.commit('userAvatar', { avatar: userInfo.userAvatars })
this.userName = userInfo.userName this.userName = userInfo.userName
const { id } = result.userAccount const { id } = result.userAccount
id && this.$store.commit('SET_ACCOUNTID', id) id && this.$store.commit('SET_ACCOUNTID', id)
this.$store.commit('SET_USERNAME', this.userName) this.$store.commit('SET_USERNAME', this.userName)
this.initSocket(result.userAccount)
}).catch(err => { }) }).catch(err => { })
}, },
}, },

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

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

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

@ -172,7 +172,13 @@ export default {
}).then(({ page }) => { }).then(({ page }) => {
const list = page.records const list = page.records
this.curriculumList = 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() this.courseChange()
}).catch(err => { }).catch(err => {

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

@ -4,54 +4,58 @@
<div class="side"> <div class="side">
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">城市合伙人区域管理</h6> <h6 class="p-title"
style="margin-bottom: 0">城市合伙人区域管理</h6>
</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"
:data="orgList"
default-expand-all default-expand-all
ref="orgTree" ref="orgTree"
node-key="id" node-key="id"
highlight-current highlight-current
:expand-on-click-node="false" :expand-on-click-node="false"
@node-click="handleNodeClick" @node-click="handleNodeClick"
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}" :props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}">
> <span class="custom-tree-node"
<span class="custom-tree-node" slot-scope="{ node, data }"> slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span> <span class="org-name">{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<el-dialog <el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'"
:title="typeForm.id ? '编辑' : '新增' + '分类'"
:visible.sync="orgVisible" :visible.sync="orgVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="50%" width="50%"
@close="closeType" @close="closeType">
> <el-form v-if="orgVisible"
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px"> ref="typeForm"
<el-form-item label="分类名称" prop="partnerClassificationName"> :model="typeForm"
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input> :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>
<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
v-else
:options="orgListDia" :options="orgListDia"
v-model="cascaderValue" v-model="cascaderValue"
:props="cascaderProps" :props="cascaderProps"
clearable clearable
style="width: 100%" style="width: 100%">
>
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="closeOrg"> </el-button> <el-button @click="closeOrg"> </el-button>
<el-button type="primary" @click="orgSubmit"> </el-button> <el-button type="primary"
@click="orgSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -66,51 +70,117 @@
</ul> </ul>
</div> --> </div> -->
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="listData"
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> class="table"
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> ref="table"
<el-table-column prop="teamName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column> stripe
<el-table-column prop="userName" label="团队负责人" align="center" min-width="100"></el-table-column> header-align="center"
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column> @selection-change="handleSelectionChange"
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> row-key="id">
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column> <el-table-column type="selection"
<el-table-column prop="phone" label="团队年费" align="center" min-width="120"> 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"> <template slot-scope="scope">
固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + 'w' : '' }} 固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + '元' : '' }}
<el-button v-auth="'/parner:费率管理:修改固定年费'" type="primary" size="mini" @click="editAnnualTeamFee(scope.row)">修改</el-button> <el-button v-auth="'/parner:费率管理:修改固定年费'"
type="primary"
size="mini"
@click="editAnnualTeamFee(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </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">
项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }} 项目抽成{{ 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> </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="annualTeamFeeVisible" width="300px" class="dialog" :close-on-click-modal="false"> <el-dialog title="请设置团队年费"
<el-form ref="form" label-width="75px" style='margin-right: 0;'> :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-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-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="annualTeamFeeVisible = false">取消</el-button> <el-button @click="annualTeamFeeVisible = false">取消</el-button>
<el-button type="primary" @click="submitAnnualTeamFee">确定</el-button> <el-button type="primary"
@click="submitAnnualTeamFee">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="请设置市场服务年费" :visible.sync="annualMarketingFeeVisible" width="300px" class="dialog" :close-on-click-modal="false"> <el-dialog title="请设置市场服务年费"
<el-form ref="form" label-width="75px" style='margin-right: 0;'> :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-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-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="annualMarketingFeeVisible = false">取消</el-button> <el-button @click="annualMarketingFeeVisible = false">取消</el-button>
<el-button type="primary" @click="submitAnnualMarketingFee">确定</el-button> <el-button type="primary"
@click="submitAnnualMarketingFee">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -125,7 +195,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,
@ -185,17 +255,17 @@ 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()
}, },
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
@ -222,13 +292,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
@ -243,7 +313,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
@ -258,14 +328,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]
// //
@ -277,18 +347,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
@ -303,20 +373,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) {
@ -328,7 +398,7 @@ export default {
} }
}, },
// //
handleNodeClick(data) { handleNodeClick (data) {
this.type = '' this.type = ''
this.curTeamId = '' this.curTeamId = ''
if (data.isTeam) { if (data.isTeam) {
@ -341,18 +411,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.teamPartnerList, { this.$post(this.api.teamPartnerList, {
type: this.type || 1, type: this.type || 1,
partnerClassificationId: this.curTeamId, partnerClassificationId: this.curTeamId,
@ -367,29 +437,29 @@ 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()
}, },
// //
editAnnualTeamFee(row) { editAnnualTeamFee (row) {
this.curRow = row this.curRow = row
this.annualTeamFee = row.annualTeamFee this.annualTeamFee = row.annualTeamFee
this.annualTeamFeeVisible = true this.annualTeamFeeVisible = true
}, },
// //
submitAnnualTeamFee() { submitAnnualTeamFee () {
this.$post(this.api.editPartnerTeamRates, { this.$post(this.api.editPartnerTeamRates, {
annualTeamFee: this.annualTeamFee, annualTeamFee: this.annualTeamFee,
annualMarketingFee: this.curRow.annualMarketingFee, annualMarketingFee: this.curRow.annualMarketingFee,
@ -399,16 +469,16 @@ export default {
this.annualTeamFeeVisible = false this.annualTeamFeeVisible = false
util.successMsg('修改成功') util.successMsg('修改成功')
this.getList() this.getList()
}).catch(res => {}) }).catch(res => { })
}, },
// //
editAnnualMarketingFee(row) { editAnnualMarketingFee (row) {
this.curRow = row this.curRow = row
this.annualMarketingFee = row.annualMarketingFee this.annualMarketingFee = row.annualMarketingFee
this.annualMarketingFeeVisible = true this.annualMarketingFeeVisible = true
}, },
// //
submitAnnualMarketingFee() { submitAnnualMarketingFee () {
this.$post(this.api.editPartnerTeamRates, { this.$post(this.api.editPartnerTeamRates, {
annualMarketingFee: this.annualMarketingFee, annualMarketingFee: this.annualMarketingFee,
annualTeamFee: this.curRow.annualTeamFee, annualTeamFee: this.curRow.annualTeamFee,
@ -418,7 +488,7 @@ export default {
this.annualMarketingFeeVisible = false this.annualMarketingFeeVisible = false
util.successMsg('修改成功') util.successMsg('修改成功')
this.getList() this.getList()
}).catch(res => {}) }).catch(res => { })
}, },
} }
}; };

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

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

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

Loading…
Cancel
Save