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) {
{ getCourseList() @@ -43,6 +65,7 @@ async function getCourseList() { const res = await api.getCourseList(queryParams.value) if(res.code === 0) { tableData.value = res.data.records + total.value = res.data.total } } async function getSubject(){ // 获取课程分类 @@ -58,7 +81,7 @@ function onSubmit() { } const onReset = () => { queryParams.value = { - pageIndex:1, + page:1, pageSize:10, name:'', status:'', @@ -126,7 +149,7 @@ function deleteCourseFunc(row) { }) } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getCourseList() } function handleSizeChange(val) { @@ -206,17 +229,20 @@ async function enterVerifyDialog() { // 审核提交 + + + + + - - - - - - - - + 查询 重置 @@ -248,12 +274,13 @@ async function enterVerifyDialog() { // 审核提交 + @@ -290,7 +317,7 @@ async function enterVerifyDialog() { // 审核提交
+ + + + - - + + @@ -310,15 +311,6 @@ async function remoteMethod(query) { - - - - - - - - - { queryParams.value = { - pageIndex:1, + page:1, pageSize:10, name:'', status:'', @@ -149,7 +149,7 @@ function deleteExamFunc(row) { }) } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getOrderList() } function handleSizeChange(val) { diff --git a/src/view/teacherManage/assistantList/index.vue b/src/view/teacherManage/assistantList/index.vue index cc96b41..ba51a08 100644 --- a/src/view/teacherManage/assistantList/index.vue +++ b/src/view/teacherManage/assistantList/index.vue @@ -23,7 +23,7 @@ const queryParams = ref({ province:'' }) // const subjectParams = ref({ -// pageIndex:1, +// page:1, // pageSize:100, // }) const state_arr = ref([ @@ -77,7 +77,7 @@ function onSubmit() { } const onReset = () => { queryParams.value = { - pageIndex:1, + page:1, pageSize:10, name:'', status:'', @@ -102,7 +102,7 @@ const handleSelectionChange = (val) => { }) } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getAssistantList() } function handleSizeChange(val) { diff --git a/src/view/teacherManage/teacherApply/index.vue b/src/view/teacherManage/teacherApply/index.vue index dab5065..aa68571 100644 --- a/src/view/teacherManage/teacherApply/index.vue +++ b/src/view/teacherManage/teacherApply/index.vue @@ -28,7 +28,7 @@ const queryParams = ref({ status:1 }) const subjectParams = ref({ - pageIndex:1, + page:1, pageSize:100, }) const state_arr = ref([ @@ -88,7 +88,7 @@ function onSubmit() { } const onReset = () => { queryParams.value = { - pageIndex:1, + page:1, pageSize:10, name:'', status:'', @@ -162,7 +162,7 @@ function deleteExamFunc(row) { }) } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getTeacherList() } function handleSizeChange(val) { diff --git a/src/view/teacherManage/teacherList/index.vue b/src/view/teacherManage/teacherList/index.vue index af1d41d..ecdcfbd 100644 --- a/src/view/teacherManage/teacherList/index.vue +++ b/src/view/teacherManage/teacherList/index.vue @@ -22,7 +22,7 @@ const queryParams = ref({ status:'' }) // const subjectParams = ref({ -// pageIndex:1, +// page:1, // pageSize:100, // }) const state_arr = ref([ @@ -76,7 +76,7 @@ function onSubmit() { } const onReset = () => { queryParams.value = { - pageIndex:1, + page:1, pageSize:10, name:'', status:'', @@ -101,7 +101,7 @@ const handleSelectionChange = (val) => { }) } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getTeacherList() } function handleSizeChange(val) { diff --git a/src/view/userManage/index.vue b/src/view/userManage/index.vue index 54f7656..a284f67 100644 --- a/src/view/userManage/index.vue +++ b/src/view/userManage/index.vue @@ -28,7 +28,7 @@ const queryParams = ref({ province:'' }) const subjectParams = ref({ - pageIndex:1, + page:1, pageSize:100, }) const tableData = ref([]) @@ -74,7 +74,7 @@ function onSubmit() { } const onReset = () => { queryParams.value = { - pageIndex:1, + page:1, pageSize:10, name:'', status:'', @@ -148,7 +148,7 @@ function deleteExamFunc(row) { }) } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getUserList() } function handleSizeChange(val) { diff --git a/src/view/userManage/view.vue b/src/view/userManage/view.vue index 9910d27..870dcb1 100644 --- a/src/view/userManage/view.vue +++ b/src/view/userManage/view.vue @@ -49,6 +49,15 @@ function toDealDetail(type) { // url = 'dealDetailPoint'; // break; // } + const params = { + user_id:route.params.id + } + if(type === detail_type.value.auctionDetail) { // 竞拍 + params.type = 1 + } + else if(type === detail_type.value.raffleDetail){ // 抽奖 + params.type = 2 + } router.push({name:type,params:{user_id:route.params.id}}) } diff --git a/src/view/userManage/withdraw.vue b/src/view/userManage/withdraw.vue index cc64fb6..23ba1d2 100644 --- a/src/view/userManage/withdraw.vue +++ b/src/view/userManage/withdraw.vue @@ -72,7 +72,7 @@ const onReset = () => { } } function handleCurrentChange(val) { - queryParams.value.pageIndex = val + queryParams.value.page = val getWithdrawList() } function handleSizeChange(val) {