@@ -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;
+ }
diff --git a/src/views/student/components/SupplyDemandDetail.vue b/src/views/student/components/SupplyDemandDetail.vue
index c9231a0..df9bf67 100644
--- a/src/views/student/components/SupplyDemandDetail.vue
+++ b/src/views/student/components/SupplyDemandDetail.vue
@@ -27,7 +27,7 @@
金额
-
{{ formatAmount(finalDetail.amount) }}
+
{{ formatAmount(finalDetail.amount) }}万元
期望资金属性
-
{{ finalDetail.expect_fund_attr || '-' }}
+
{{ finalDetail.fund_company || '-' }}
行业类型
diff --git a/src/views/student/components/SupplyDemandEdit.vue b/src/views/student/components/SupplyDemandEdit.vue
index 8dfba26..7e107ff 100644
--- a/src/views/student/components/SupplyDemandEdit.vue
+++ b/src/views/student/components/SupplyDemandEdit.vue
@@ -46,13 +46,13 @@
-
+ 万元
-
-
+
+
@@ -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 = ''
diff --git a/src/views/student/supply_demand.vue b/src/views/student/supply_demand.vue
index 6f8a24a..cf98d65 100644
--- a/src/views/student/supply_demand.vue
+++ b/src/views/student/supply_demand.vue
@@ -24,7 +24,7 @@
-
+
@@ -110,7 +110,7 @@
编辑
拒绝
退回修改
- 永久隐藏
+ 取消发布
详情
@@ -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('操作失败')
diff --git a/vue.config.js b/vue.config.js
index 680480d..90cdd01 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -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 传递选项