反馈更改

master
lion 2 months ago
parent 75508c3a73
commit 76cabe795e

@ -63,6 +63,65 @@
</div>
</template>
</el-table-column>
<el-table-column prop="direction" label="课酬" width="120" align="left">
<template slot-scope="scope">
<div class="cc-item" v-for="(item, index) in scope.row.course_contents" :key="index">
<div class="salary-display">
<el-popover
:ref="`popover-${item.id}`"
placement="top"
width="200"
trigger="click"
@show="startEdit(item)"
>
<div class="salary-edit-popover">
<el-input
v-model="editingSalary"
placeholder="请输入课酬"
size="small"
style="margin-bottom: 10px;"
@keyup.enter.native="saveSalary(item)"
/>
<div class="popover-buttons">
<el-button size="mini" type="primary" @click="saveSalary(item)"></el-button>
</div>
</div>
<span slot="reference">{{ item.salary ? item.salary : '' }}<i class="el-icon-edit salary-edit-icon" ></i></span>
</el-popover>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="tutor" label="导师" width="120" align="left">
<template slot-scope="scope">
<div class="cc-item" v-for="(item, index) in scope.row.course_contents" :key="index">
<div class="salary-display">
<el-popover
:ref="`tutor-popover-${item.id}`"
placement="top"
width="200"
trigger="click"
@show="startEditTutor(item)"
>
<div class="salary-edit-popover">
<el-input
v-model="editingTutor"
placeholder="请输入导师"
size="small"
style="margin-bottom: 10px;"
@keyup.enter.native="saveTutor(item)"
/>
<div class="popover-buttons">
<el-button size="mini" type="primary" @click="saveTutor(item)"></el-button>
</div>
</div>
<span slot="reference">{{ item.tutor ? item.tutor : '' }}<i class="el-icon-edit salary-edit-icon"></i></span>
</el-popover>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="240" align="left">
<template slot-scope="scope">
<div class="cc-item" v-for="(item, index) in scope.row.course_contents" :key="index">
@ -104,6 +163,9 @@
import {
saveAs
} from "file-saver";
import {
save as saveCourseContent
} from '@/api/course/courseContent.js'
export default {
components: {
addTeacher,
@ -119,6 +181,10 @@
list: [],
total: 0,
editingItem: null,
editingSalary: '',
editingTutorItem: null,
editingTutor: '',
table_item: [{
type: 'index',
align: 'center',
@ -240,6 +306,68 @@
reject(error)
})
},
startEdit(item) {
this.editingItem = item
this.editingSalary = item.salary || ''
},
cancelEdit() {
this.editingItem = null
this.editingSalary = ''
// popover
this.$nextTick(() => {
if (this.editingItem) {
const popoverRef = this.$refs[`popover-${this.editingItem.id}`]
if (popoverRef && popoverRef[0]) {
popoverRef[0].doClose()
}
}
})
},
async saveSalary(item) {
try {
await saveCourseContent({
id: item.id,
salary: this.editingSalary
})
this.$message.success('保存成功')
this.cancelEdit()
this.getList()
} catch (error) {
this.$message.error('保存失败')
console.error('保存课酬失败:', error)
}
},
startEditTutor(item) {
this.editingTutorItem = item
this.editingTutor = item.tutor || ''
},
cancelEditTutor() {
this.editingTutorItem = null
this.editingTutor = ''
// tutor popover
this.$nextTick(() => {
if (this.editingTutorItem) {
const popoverRef = this.$refs[`tutor-popover-${this.editingTutorItem.id}`]
if (popoverRef && popoverRef[0]) {
popoverRef[0].doClose()
}
}
})
},
async saveTutor(item) {
try {
await saveCourseContent({
id: item.id,
tutor: this.editingTutor
})
this.$message.success('保存成功')
this.cancelEditTutor()
this.getList()
} catch (error) {
this.$message.error('保存失败')
console.error('保存导师失败:', error)
}
},
importTable() {
this.$refs.imports.show()
}
@ -276,4 +404,32 @@
.cc-item:last-child {
border-bottom: none;
}
/* 课酬编辑样式 */
.salary-display {
display: flex;
align-items: center;
justify-content: space-between;
}
.salary-edit-icon {
margin-left: 4px;
cursor: pointer;
color: #409eff;
font-size: 12px;
}
.salary-edit-icon:hover {
color: #66b1ff;
}
.salary-edit-popover {
padding: 10px;
}
.popover-buttons {
display: flex;
justify-content: flex-end;
gap: 8px;
}
</style>

@ -27,7 +27,7 @@
</div>
<div class="section">
<div class="label">金额</div>
<div>{{ formatAmount(finalDetail.amount) }}</div>
<div>{{ formatAmount(finalDetail.amount) }}万元</div>
</div>
<div class="section">
<div class="label">融资阶段</div>
@ -35,7 +35,7 @@
</div>
<div class="section">
<div class="label">期望资金属性</div>
<div>{{ finalDetail.expect_fund_attr || '-' }}</div>
<div>{{ finalDetail.fund_company || '-' }}</div>
</div>
<div class="section">
<div class="label">行业类型</div>

@ -46,13 +46,13 @@
</el-select>
</el-form-item>
<el-form-item label="金额">
<el-input-number v-model="form.amount" :precision="2" :step="0.01" :min="0" style="width: 240px;" />
<el-input-number v-model="form.amount" :precision="2" :step="0.01" :min="0" style="width: 240px;" />万元
</el-form-item>
<el-form-item label="融资阶段">
<el-input v-model="form.fund_stage" maxlength="50" />
</el-form-item>
<el-form-item label="期望资金属性">
<el-input v-model="form.expect_fund_attr" maxlength="50" />
<el-form-item label="公司名称">
<el-input v-model="form.fund_company" maxlength="50" />
</el-form-item>
<el-form-item label="行业类型">
<el-input v-model="form.industry_type" maxlength="50" />
@ -201,7 +201,7 @@ export default {
fund_type: '',
amount: 0,
fund_stage: '',
expect_fund_attr: '',
fund_company: '',
industry_type: '',
product: '',
desc: '',
@ -249,7 +249,7 @@ export default {
fund_type: '',
amount: 0,
fund_stage: '',
expect_fund_attr: '',
fund_company: '',
industry_type: '',
product: '',
desc: '',
@ -274,7 +274,7 @@ export default {
fund_type: val.fund_type || '',
amount: typeof val.amount === 'number' ? val.amount : (parseFloat(val.amount) || 0),
fund_stage: val.fund_stage || '',
expect_fund_attr: val.expect_fund_attr || '',
fund_company: val.fund_company || '',
industry_type: val.industry_type || '',
product: val.product || '',
desc: val.desc || '',
@ -385,7 +385,7 @@ export default {
data.fund_type = this.form.fund_type
data.amount = this.form.amount
data.fund_stage = this.form.fund_stage
data.expect_fund_attr = this.form.expect_fund_attr
data.fund_company = this.form.fund_company
data.industry_type = this.form.industry_type
data.product = this.form.product
data.desc = this.form.desc
@ -395,7 +395,7 @@ export default {
data.fund_type = ''
data.amount = 0
data.fund_stage = ''
data.expect_fund_attr = ''
data.fund_company = ''
data.industry_type = ''
data.product = ''
data.desc = ''

@ -24,7 +24,7 @@
<el-option label="已通过" value="1"></el-option>
<el-option label="已拒绝" value="2"></el-option>
<el-option label="退回修改" value="3"></el-option>
<el-option label="永久隐藏" value="4"></el-option>
<el-option label="取消发布" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item>
@ -110,7 +110,7 @@
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button v-if="scope.row.status === 0" type="danger" size="mini" icon="el-icon-close" @click="handleReject(scope.row)"></el-button>
<el-button v-if="scope.row.status === 0 || scope.row.status === 1" type="warning" size="mini" icon="el-icon-refresh" @click="handleReturnForRevision(scope.row)">退</el-button>
<el-button v-if="scope.row.status === 0 || scope.row.status === 1" type="info" size="mini" icon="el-icon-hide" @click="handlePermanentlyHide(scope.row)"></el-button>
<el-button v-if="scope.row.status === 0 || scope.row.status === 1" type="info" size="mini" icon="el-icon-hide" @click="handlePermanentlyHide(scope.row)"></el-button>
<el-button type="info" size="mini" icon="el-icon-view" @click="handleView(scope.row)"></el-button>
</div>
</template>
@ -230,7 +230,7 @@ export default {
1: 'success', //
2: 'danger', //
3: 'warning', // 退
4: 'info' //
4: 'info' //
}
return statusMap[status] || 'info'
},
@ -240,7 +240,7 @@ export default {
1: '已通过',
2: '已拒绝',
3: '退回修改',
4: '永久隐藏'
4: '取消发布'
}
return statusText[status] || '未知'
},
@ -292,7 +292,7 @@ export default {
async handlePermanentlyHide(row) {
try {
await supplyDemandSave({ id: row.id, status: 4 })
this.$message.success('已永久隐藏')
this.$message.success('已取消发布')
this.getList()
} catch (e) {
this.$message.error('操作失败')

@ -27,8 +27,8 @@ module.exports = {
*
*/
publicPath: process.env.ENV === 'staging' ? '/admin' : '/admin',
// outputDir: '/Users/mac/Documents/朗业/2025/s-苏州科技商学院/wx.sstbc.com/public/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-苏州科技商学院/wx.sstbc.com/public/admin',
outputDir: '/Users/mac/Documents/朗业/2025/s-苏州科技商学院/wx.sstbc.com/public/admin',
// outputDir: '/Users/mac/Documents/朗业/2024/s-苏州科技商学院/wx.sstbc.com/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save