diff --git a/.env.development b/.env.development
index c974c09..1bac6a1 100644
--- a/.env.development
+++ b/.env.development
@@ -2,8 +2,9 @@ ENV = 'development'
VITE_CLI_PORT = 8088
VITE_SERVER_PORT = 8888
VITE_BASE_API = /api
-//VITE_BASE_PATH = http://192.168.1.133
-VITE_BASE_PATH = http://122.9.143.61
+VITE_BASE_PATH = http://192.168.1.133
+//VITE_BASE_PATH = http://122.9.143.61
+//VITE_BASE_PATH = http://192.168.1.40
VITE_EDITOR = vscode
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
// 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP
diff --git a/.env.production b/.env.production
index ac86e8a..3a1bdd8 100644
--- a/.env.production
+++ b/.env.production
@@ -4,4 +4,5 @@ VITE_CLI_PORT = 8080
VITE_SERVER_PORT = 8888
VITE_BASE_API = /api
#下方修改为你的线上ip
-VITE_BASE_PATH = https://admin.api.gwkjxb.com
+//VITE_BASE_PATH = https://admin.api.gwkjxb.com
+VITE_BASE_PATH = http://test_admin_api.gwkjxb.com
diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..303aafc
Binary files /dev/null and b/dist.zip differ
diff --git a/src/view/auctionManage/index.vue b/src/view/auctionManage/index.vue
index f891e94..21132d5 100644
--- a/src/view/auctionManage/index.vue
+++ b/src/view/auctionManage/index.vue
@@ -19,26 +19,38 @@ const queryParams = ref({
page:1,
pageSize:10,
key:'',
- status:'',
+ status:20,
sort:'',
current_page:1
})
-// const subjectParams = ref({
-// pageIndex:1,
-// pageSize:100,
-// })
const state_arr = ref([
{
- name:'报名中',
+ name:'全部',
+ value:20
+ },
+ {
+ name:'已上架',
value:1
},
{
- name:'取消',
+ name:'未上架',
+ value:0
+ },
+ {
+ name:'已下架',
value:2
},
{
- name:'结束',
+ name:'已结束',
value:3
+ },
+ {
+ name:'未开始',
+ value:4
+ },
+ {
+ name:'报名中',
+ value:5
}
])
const tableData = ref([])
@@ -65,7 +77,7 @@ const onReset = () => {
page:1,
pageSize:10,
key:'',
- status:'',
+ status:20,
sort:'',
current_page:1
}
@@ -107,15 +119,18 @@ function getStateName(row) {
name = '已结束';
row.status = 3
}
- else{
+ else if(row.begin_time < (Date.parse(new Date()))) { // 已开始
name = '报名中';
}
+ else{
+ name = '未开始';
+ }
break;
case 2:
- name = '已取消';
+ name = '已下架';
break;
case 0:
- name = '已取消';
+ name = '未上架';
break;
case 3:
name = '已结束';
@@ -362,19 +377,20 @@ function closeViewDialog() {
link
@click="editAuctionFunc(scope.row)"
>编辑
- 明细
+
+
+
+
+
+
+
删除
上架
下架
diff --git a/src/view/course/addCourse/index.vue b/src/view/course/addCourse/index.vue
index d1ae8cc..4225d31 100644
--- a/src/view/course/addCourse/index.vue
+++ b/src/view/course/addCourse/index.vue
@@ -19,7 +19,7 @@ const course_id = ref(0)
const active = ref(0)
const form = ref({status:1,is_boutique:-1,is_audition:-1})
const subjectParams = ref({
- pageIndex:1,
+ page:1,
pageSize:100,
})
const subjectList = ref([])
diff --git a/src/view/course/components/mediaPool.vue b/src/view/course/components/mediaPool.vue
index eea154d..3ef54b4 100644
--- a/src/view/course/components/mediaPool.vue
+++ b/src/view/course/components/mediaPool.vue
@@ -20,7 +20,7 @@ import { getToken } from '@/utils/auth'
const headers = ref({ Authorization: 'Bearer ' + getToken() })
const drawer = ref(false)
const queryParams =ref({
- pageIndex:1,
+ page:1,
pageSize:10,
name:'',
subject:''
@@ -41,7 +41,7 @@ function onSubmit() {
}
function onReset() {
queryParams.value = {
- pageIndex:1,
+ page:1,
pageSize:10,
name:''
}
diff --git a/src/view/course/courseCategory/index.vue b/src/view/course/courseCategory/index.vue
index 3047751..7e604cf 100644
--- a/src/view/course/courseCategory/index.vue
+++ b/src/view/course/courseCategory/index.vue
@@ -38,16 +38,19 @@ onMounted(() => {
getSubjectList()
})
// 方法
+const origin_list = ref([])
async function getSubjectList() {
const res = await api.getSubjectList(queryParams.value)
subjectList.value = res.data.records
if(res.code === 0) {
subjectList.value = res.data.records
total.value = res.data.total
+ origin_list.value = res.data.records
subjectList.value = addTreeFormatSubject(subjectList.value)
// console.log(subjectList.value)
}
}
+const current_categral_id = ref(0) // 当前编辑id
function addTreeFormatSubject(data) {
if(!data) {
return []
@@ -55,6 +58,13 @@ function addTreeFormatSubject(data) {
data.map( item => {
item.label = item.name
item.value = item.id
+
+ if(current_categral_id.value && (item.id === current_categral_id.value || item.parent_id === current_categral_id.value)) {
+ item.disabled = true
+ }
+ else{
+ item.disabled = false
+ }
if(item.level === 3) {
item.disabled = true
}
@@ -83,12 +93,15 @@ const handleSelectionChange = (val) => {
apis.value = val
}
function editApiFunc(row) {
+ // 深拷贝?
for(let prop in form.value) {
if(row[prop]){
form.value[prop] = row[prop]
}
}
form.value.id = row.id
+ current_categral_id.value = row.id
+ subjectList.value = addTreeFormatSubject(origin_list.value)
// return
openDialog('edit')
}
@@ -119,6 +132,8 @@ function openDialog(key) {
switch (key) {
case 'add':
dialogTitle.value = '新增类型'
+ current_categral_id.value = 0
+ subjectList.value = addTreeFormatSubject(origin_list.value)
break
case 'edit':
dialogTitle.value = '编辑类型'
@@ -183,13 +198,13 @@ async function enterDialog() { // 确认创建或修改
}
const onReset = () => {
queryParams.value = {
- pageIndex:1,
+ page:1,
pageSize:10,
keyword:''
}
}
function handleCurrentChange(val) {
- queryParams.value.pageIndex = val
+ queryParams.value.page = val
getSubjectList()
}
function handleSizeChange(val) {
@@ -252,7 +267,7 @@ function handleSizeChange(val) {