This commit is contained in:
2025-04-27 09:16:42 +08:00
parent 3a40d2d3ee
commit 95ee4bcebf
13 changed files with 964 additions and 752 deletions

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ selenium-debug.log
# common
common/common.vue
/src/views/common/common.vue
config/index.js

View File

@@ -23,7 +23,7 @@ module.exports = {
},
// Various Dev Server settings
host: '192.168.110.160', // can be overwritten by process.env.HOST
host: '192.168.110.157', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,

BIN
dist.zip Normal file

Binary file not shown.

View File

@@ -5,31 +5,6 @@
`width: 100%; height: 100%; margin-top: ${!isNoSearch ? '-50px' : '0'}`
"
>
<!-- <el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
style="float: right"
>
<el-form-item>
<el-input
v-model="dataForm.key"
placeholder="商品名称"
clearable
size="small"
></el-input>
</el-form-item>
<el-form-item>
<el-button
@click="
pageIndex = 1;
getDataList(bookMarketId);
"
size="small"
>查询</el-button
>
</el-form-item>
</el-form> -->
<div class="search_form">
<div class="addFormBox shopFormBox">
<el-form ref="addForm" label-width="80px" :model="dataForm">
@@ -57,16 +32,16 @@
</div>
</div>
<div class="shop_box">
<div class="shop_box" v-loading="dataListLoading">
<!-- @selection-change="handleSelectionChange" -->
<el-table
v-if="!dataListLoading"
ref="table"
:height="`${isShowPagination?'calc(100% - 50px)':'100%'}`"
:height="`${isShowPagination ? 'calc(100% - 50px)' : '100%'}`"
:data="associatedGoodsList"
:row-key="getRowKeys"
border
size="mini"
v-loading="dataListLoading"
style="width: 100%"
>
<slot name="tableItem"></slot>
@@ -81,7 +56,8 @@
</el-table-column> -->
<!-- -->
<el-table-column v-if="!disableOperate"
<el-table-column
v-if="!disableOperate"
header-align="center"
align="center"
label="操作"
@@ -105,8 +81,9 @@
</template>
</el-table-column>
</el-table>
<el-pagination style="margin-top: 10px;"
v-if="isShowPagination"
<el-pagination
style="margin-top: 10px;"
v-if="isShowPagination && !dataListLoading"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current"
@@ -162,7 +139,7 @@
</div>
</template>
<script>
<script>import axios from 'axios'
// import chooseBook from './chooseBook.vue'
// import AddOrUpdate from './shopproduct-add-or-update'
export default {
@@ -227,35 +204,94 @@ export default {
},
async activated() {
this.multipleSelection = [];
await this.getAssociatedGoodsList({ ...this.dataForm });
if (this.otherInfo.statisticsQuery) {
await this.statisticsQuery();
} else {
await this.getAssociatedGoodsList({ ...this.dataForm });
}
// await this.getGoodsTypeList();
},
methods: {
handleSizeChange(val) {
async handleExport() {
var filename = "downloaded_file.xlsx";
try {
this.$http({
url: this.$http.adornUrl(/master/userContribution/exportContributionStatQuery),
method: "post",
data: this.$http.adornData({
current: this.current,
limit: this.limit
},{
responseType: "blob" // 关键点:告诉 axios 返回的是二进制文件
})
}).then(res=>{
console.log('res at line 230:', res)
})
// const res = await axios.post(
// window.SITE_CONFIG.baseUrl+"/master/userContribution/exportContributionStatQuery",
// {
// current: this.current,
// limit: this.limit
// },
// {
// responseType: "blob" // 关键点:告诉 axios 返回的是二进制文件
// }
// );
const blob = new Blob([res.data]);
const link = document.createElement("a");
link.href = window.URL.createObjectURL(blob);
link.download = filename;
link.click();
window.URL.revokeObjectURL(link.href); // 释放内存
} catch (err) {
console.error("文件下载失败:", err);
}
},
async handleSizeChange(val) {
this.limit = val;
this.getAssociatedGoodsList({ ...this.dataForm });
if (this.otherInfo.statisticsQuery) {
await this.statisticsQuery();
} else {
await this.getAssociatedGoodsList({ ...this.dataForm });
}
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
async handleCurrentChange(val) {
this.current = val;
this.getAssociatedGoodsList({ ...this.dataForm });
if (this.otherInfo.statisticsQuery) {
await this.statisticsQuery();
} else {
await this.getAssociatedGoodsList({ ...this.dataForm });
}
console.log(`当前页: ${val}`);
},
editHandleClose() {
this.editForm = {};
this.editVisible = false;
},
submitEdit() {
async submitEdit() {
this.$http({
url: this.$http.adornUrl(`${this.urlList.editCourse}`),
method: "post",
data: this.$http.adornData(this.editForm)
}).then(data => {
}).then(async data => {
this.$message.success("操作成功!");
this.editHandleClose();
this.getAssociatedGoodsList();
if (this.otherInfo.statisticsQuery) {
await this.statisticsQuery();
} else {
await this.getAssociatedGoodsList();
}
});
},
editCourse(row) {
console.log("row", row);
if (this.CustomEdit) {
@@ -369,8 +405,11 @@ export default {
// this.$refs.table.clearSelection();
// this.multipleSelection = [];
},
// 获取关联数据列表
async getAssociatedGoodsList() {
this.$emit("changeStatisticsQuery");
this.disableOperate = false;
console.log("🚀 ~ getAssociatedGoodsList ~ form:11111", form);
var form = { ...this.defaultForm, ...this.dataForm };
@@ -394,7 +433,7 @@ export default {
this.associatedGoodsList = [
...data[this.otherInfo.resultValueName].records
];
this.total = data.certificateList.total;
this.total = data[this.otherInfo.resultValueName].total;
console.log("this.total at line 392:", this.total);
this.$forceUpdate();
} else {
@@ -475,6 +514,47 @@ export default {
});
}
},
async statisticsQuery() {
this.disableOperate = true;
var form = { ...this.defaultForm, ...this.dataForm };
this.dataListLoading = true;
this.$http
.request({
url: this.$http.adornUrl(
`/master/userContribution/contributionStatQuery`
),
method: "POST",
data: {
current: this.current,
limit: this.limit,
tel: form.tel,
startTime: form.startTime ? form.startTime : ""
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json"
}
})
.then(async ({ data }) => {
if (data && data.code === 0) {
if (this.otherInfo.resultValueName) {
this.associatedGoodsList = [
...data[this.otherInfo.resultValueName].records
];
this.total = data[this.otherInfo.resultValueName].total;
this.$forceUpdate();
} else {
this.associatedGoodsList = [...data.result.records];
this.total = data[result].total;
}
this.dataListLoading = false;
}
});
},
// 每页数
sizeChangeHandle(val) {
// this.changePageCoreRecordData();

View File

@@ -45,6 +45,7 @@
default-expand-all
:filter-node-method="filterNode"
ref="tree"
@node-click="handleNodeClick"
:expand-on-click-node="false"
>
@@ -75,7 +76,7 @@
type="text"
size="mini"
@click.stop="handleClickNodes(node, data, 'addChildren')"
v-if="data.isLast != 1"
v-if="data.isLast != 1&&!disableAddChild"
>
添加下级
</el-button>
@@ -88,7 +89,7 @@
</el-button> -->
<!-- v-if="node.childNodes.length == 0" -->
<el-button
<el-button v-if="!data.disabled"
type="text"
size="mini"
@click.stop="remove(data)"
@@ -114,7 +115,8 @@ export default {
"productId",
"sourceType",
"axiosType",
"axiosResultKey"
"axiosResultKey",
"disableAddChild",
],
data() {
return {

View File

@@ -17,9 +17,31 @@
<p>绑定用户</p>
</div> -->
<template v-if="pageType == 'label'">
<el-form-item label="手机号/邮箱:" prop="userKey" class="form_item">
<el-form-item
label="手机号/邮箱:"
prop="userKey"
class="form_item"
>
<div style="display: flex;align-items: center;">
<el-autocomplete
v-if="!isEdit"
style="width: 400px;"
v-model="addCertificateForm.userKey"
:fetch-suggestions="loadAll"
placeholder="请输入手机号/邮箱"
@select="handleSelect"
>
<template #default="{ item }">
<div class="custom-item">
<span>{{ item.tel ? item.tel : item.email }}</span>
<span
style="color: gray; margin-left: 10px;"
v-if="item.name"
>({{ item.name }})</span
>
</div>
</template>
</el-autocomplete>
<span v-if="isEdit">{{ addCertificateForm.userKey }}</span>
</div>
</el-form-item>

View File

@@ -1,6 +1,5 @@
<template>
<div class="mod-config">
<commonTree
source="tags"
axiosType="raw"
@@ -17,138 +16,137 @@
v-loading="!isFresh"
style="width: calc(100% - 360px); height: 100%; overflow-y: scroll; float: right; border: 1px solid #bababa; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); border-radius: 10px;position: relative;"
>
<div class="border_box info_box">
<div class="title_box">
<div class="title"><span class="line"></span>基本标签信息</div>
</div>
<div class="addFormBox">
<el-form :model="addForm" ref="addForm" label-width="80px">
<el-form-item label="标签名称" prop="title" class="form_item">
<el-input
placeholder="请输入标签名称"
style="width: 100%"
v-model="addForm.title"
clearable
>
</el-input>
</el-form-item>
<el-form-item label="排序" prop="sort" class="form_item">
<el-input-number
placeholder="请输入标签排序"
style="width: 100%"
v-model="addForm.sort"
:min="0"
clearable
@keyup.native="UpNumber"
@keydown.native="UpNumber"
>
</el-input-number>
</el-form-item>
<el-form-item
label="是否为最终级"
prop="isLast"
label-width="120px"
class="form_item"
<div class="border_box info_box">
<div class="title_box">
<div class="title"><span class="line"></span>基本标签信息</div>
</div>
<div class="addFormBox">
<el-form :model="addForm" ref="addForm" label-width="80px">
<el-form-item label="标签名称" prop="title" class="form_item">
<el-input
placeholder="请输入标签名称"
style="width: 100%"
v-model="addForm.title"
clearable
>
<el-switch
v-model="addForm.isLast"
active-color="#13ce66"
:active-value="1"
:inactive-value="0"
active-text=""
inactive-text=""
@change="handleChangeIsLast"
>
</el-switch>
</el-form-item>
</el-form>
</el-input>
</el-form-item>
<el-form-item label="排序" prop="sort" class="form_item">
<el-input-number
placeholder="请输入标签排序"
style="width: 100%"
v-model="addForm.sort"
:min="0"
clearable
@keyup.native="UpNumber"
@keydown.native="UpNumber"
>
</el-input-number>
</el-form-item>
<el-form-item
label="是否为最终级"
prop="isLast"
label-width="120px"
class="form_item"
>
<el-switch
v-model="addForm.isLast"
active-color="#13ce66"
:active-value="1"
:inactive-value="0"
active-text=""
inactive-text=""
@change="handleChangeIsLast"
>
</el-switch>
</el-form-item>
</el-form>
</div>
</div>
<div
style="padding-top: 0;padding-bottom: 0;"
class="border_box tree_content_box"
v-if="currentNode && currentNode.data.isLast == 1"
>
<div class="title_box" style="margin-bottom: 10px; height: 40px">
<div class="title">
<span class="line"></span>证书列表
<el-button
plain
type="primary"
style="margin-left: 20px"
@click="openTable('addForm')"
size="mini"
>新增</el-button
>
<!-- <div style="" class="button_box"> -->
<!-- <el-button plain type="danger" @click="handleCheckAllChange(true)" size="mini">清空</el-button> -->
<!-- </div> -->
</div>
</div>
<div
style="padding-top: 0;padding-bottom: 0;" class="border_box tree_content_box"
v-if="currentNode && currentNode.data.isLast == 1"
<!-- :isNoSearch="true" -->
<commonShop
:CustomEdit="true"
:otherInfo="{
httpType: 'raw',
resultValueName: 'certificateList'
}"
:defaultForm="{
tel: '',
title: '',
labelId: addForm.id
}"
axiosType="raw"
getAssociatedGoodsListKey="id"
:isNoPaging="true"
:isShowPagination="true"
getAssociatedGoodsListValue="result"
:tableColumnList="tableColumnList"
:currentId="addForm.id ? addForm.id : ''"
currentType="bookMarketId"
:dataList="associatedGoodsList"
:urlList="urlList"
@delete="dataFormDelete"
@edit="handleDataFormEdit"
:isEdit="isEdit"
ref="commonShop"
:style="`height: calc(100vh - 340px); `"
>
<div class="title_box" style="margin-bottom: 10px; height: 40px">
<div class="title">
<span class="line"></span>证书列表
<el-button
plain
type="primary"
style="margin-left: 20px"
@click="openTable('addForm')"
size="mini"
>新增</el-button
<template slot="searchFormItem" slot-scope="slotProps">
<el-form-item
label="手机号:"
prop="title"
class="form_item"
style="width: 240px;"
>
<el-input
size="small"
placeholder="请输入手机号"
style="width: 100%"
v-model="slotProps.dataForm.tel"
clearable
>
<!-- <div style="" class="button_box"> -->
<!-- <el-button plain type="danger" @click="handleCheckAllChange(true)" size="mini">清空</el-button> -->
<!-- </div> -->
</div>
</div>
<!-- :isNoSearch="true" -->
<commonShop
:CustomEdit="true"
:otherInfo="{
httpType: 'raw',
resultValueName: 'certificateList'
}"
:defaultForm="{
tel:'',
title:'',
labelId: addForm.id
}"
axiosType="raw"
getAssociatedGoodsListKey="id"
:isNoPaging="true"
:isShowPagination="true"
getAssociatedGoodsListValue="result"
:tableColumnList="tableColumnList"
:currentId="addForm.id ? addForm.id : ''"
currentType="bookMarketId"
:dataList="associatedGoodsList"
:urlList="urlList"
@delete="dataFormDelete"
@edit="handleDataFormEdit"
:isEdit="isEdit"
ref="commonShop"
:style="`height: calc(100vh - 340px); `"
>
<template slot="searchFormItem" slot-scope="slotProps">
<el-form-item
label="手机号:"
prop="title"
class="form_item"
style="width: 240px;"
</el-input>
</el-form-item>
<el-form-item
label="证书名称:"
prop="title"
class="form_item"
style="width: 240px;"
>
<el-input
size="small"
placeholder="请输入证书名称"
style="width: 100%"
v-model="slotProps.dataForm.title"
clearable
>
<el-input
size="small"
placeholder="请输入手机号"
style="width: 100%"
v-model="slotProps.dataForm.tel"
clearable
>
</el-input>
</el-form-item>
<el-form-item
label="证书名称:"
prop="title"
class="form_item"
style="width: 240px;"
>
<el-input
size="small"
placeholder="请输入证书名称"
style="width: 100%"
v-model="slotProps.dataForm.title"
clearable
>
</el-input>
</el-form-item>
<!-- <el-form-item label="商品类型" prop="goodsType" class="form_item">
</el-input>
</el-form-item>
<!-- <el-form-item label="商品类型" prop="goodsType" class="form_item">
<el-select
size="small"
v-model="slotProps.dataForm.goodsType"
@@ -166,50 +164,50 @@
</el-option>
</el-select>
</el-form-item> -->
</template>
<template slot="tableItem" slot-scope="slotProps">
<el-table-column
label="证书编号"
width="140"
align="center"
prop="certificateNo"
>
<!-- <template slot-scope="scope">
</template>
<template slot="tableItem" slot-scope="slotProps">
<el-table-column
label="证书编号"
width="140"
align="center"
prop="certificateNo"
>
<!-- <template slot-scope="scope">
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
</template> -->
</el-table-column>
<el-table-column
width="180"
prop="toSociologySort"
header-align="center"
align="center"
label="用户信息"
>
<template slot-scope="scope">
<div>
<span
>姓名{{
scope.row.user.name ? scope.row.user.name : "-"
}}</span
>
</div>
<div v-if="scope.row.user.tel">
<span>手机号{{ scope.row.user.tel }}</span>
</div>
<div v-else-if="scope.row.user.email">
<span>邮箱{{ scope.row.user.email }}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="title"
header-align="center"
align="center"
label="证书名称"
>
</el-table-column>
</el-table-column>
<el-table-column
width="180"
prop="toSociologySort"
header-align="center"
align="center"
label="用户信息"
>
<template slot-scope="scope">
<div>
<span
>姓名{{
scope.row.user.name ? scope.row.user.name : "-"
}}</span
>
</div>
<div v-if="scope.row.user.tel">
<span>手机号{{ scope.row.user.tel }}</span>
</div>
<div v-else-if="scope.row.user.email">
<span>邮箱{{ scope.row.user.email }}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="title"
header-align="center"
align="center"
label="证书名称"
>
</el-table-column>
<!-- <el-table-column
<!-- <el-table-column
header-align="center"
align="center"
label="课程图"
@@ -225,67 +223,67 @@
/>
</template>
</el-table-column> -->
<el-table-column
header-align="center"
align="center"
label="证书"
width="100"
<el-table-column
header-align="center"
align="center"
label="证书"
width="100"
>
<template
slot-scope="scope"
v-if="scope.row.certificateUrl != ''"
>
<template
slot-scope="scope"
v-if="scope.row.certificateUrl != ''"
>
<!-- <el-image
<!-- <el-image
ref="preview"
fit="cover"
:preview-src-list="previewImages"
:src="item"
v-for="(item,index) in scope.row.certificateUrl.split(',')"
/> -->
<el-image
<el-image
:key="index"
v-for="(item, index) in scope.row.certificateUrl.split(',')"
style="width: 30px; height: 40px;margin-right: 4px;cursor: pointer;"
:src="item"
:preview-src-list="scope.row.certificateUrl.split(',')"
>
</el-image>
v-for="(item, index) in scope.row.certificateUrl.split(',')"
style="width: 30px; height: 40px;margin-right: 4px;cursor: pointer;"
:src="item"
:preview-src-list="scope.row.certificateUrl.split(',')"
>
</el-image>
<!-- <img style="margin-right: 5px;"
<!-- <img style="margin-right: 5px;"
v-for="(item,index) in scope.row.certificateUrl.split(',')"
:src="item"
width="30"
height="40"
class="tableImg"
/> -->
</template>
</el-table-column>
<el-table-column
prop="createTime"
header-align="center"
align="center"
width="140"
label="创建日期"
>
</el-table-column>
</template>
</commonShop>
</template>
</el-table-column>
<el-table-column
prop="createTime"
header-align="center"
align="center"
width="140"
label="创建日期"
>
</el-table-column>
</template>
</commonShop>
<!-- <div
<!-- <div
style=" border: 1px dashed #bababa;"
v-if="currentNode && currentNode.data.isLast == 1"
></div> -->
</div>
<div class="submitButton submitButtonBox">
<el-button
type="primary"
@click="dataFormSubmit('addForm')"
size="small"
style="float: right;margin-right: 20px;"
>确定</el-button
>
<!-- </div> -->
</div>
</div>
<div class="submitButton submitButtonBox">
<el-button
type="primary"
@click="dataFormSubmit('addForm')"
size="small"
style="float: right;margin-right: 20px;"
>确定</el-button
>
<!-- </div> -->
</div>
</div>
<!-- <el-form
@@ -296,7 +294,8 @@
</el-form> -->
<addCertificate v-if="currentNode.data&&currentNode.data.id"
<addCertificate
v-if="currentNode.data && currentNode.data.id"
ref="addCertificate"
:data="addCertificateForm"
:labelId="currentNode.data.id"
@@ -447,8 +446,7 @@ export default {
saveShop: "/master/userCertificate/editCertificate",
add: "/master/userCertificate/saveUserCertificateLabel",
edit: "/master/userCertificate/editUserCertificateLabel",
hasBindProductList:
"/master/userCertificate/userCertificateList",
hasBindProductList: "/master/userCertificate/userCertificateList",
CanBindProductList: "/master/courseMedical/getCourseListCanMedical",
editCourse: "/master/courseMedical/updateCourseToMedicalSort"
},
@@ -573,11 +571,10 @@ export default {
this.getDataList();
},
methods: {
refresh(){
this.$nextTick(()=>{
this.$refs.commonShop.getAssociatedGoodsList()
})
refresh() {
this.$nextTick(() => {
this.$refs.commonShop.getAssociatedGoodsList();
});
},
getCate(id) {
this.linshiids = [];
@@ -609,16 +606,16 @@ export default {
this.$nextTick(() => {
this.$refs.addCertificate.init("edit", {
certificateNo:data.certificateNo,
id:data.id,
userId:data.userId,
userKey:data.user.tel||data.user.email,
userName:data.user.name,
courseId:data.courseId,
courseName:data.title,
labelId:data.labelId,
images:data.certificateUrl,
},);
certificateNo: data.certificateNo,
id: data.id,
userId: data.userId,
userKey: data.user.tel || data.user.email,
userName: data.user.name,
courseId: data.courseId,
courseName: data.title,
labelId: data.labelId,
images: data.certificateUrl
});
});
// this.selectChange(data.id)
@@ -1405,7 +1402,7 @@ export default {
width: 100%;
// float: right;
background: #fffefe;
margin-top: 4px;
margin-top: 4px;
border-radius: 10px;
padding: 15px 15px;
box-sizing: border-box;

View File

@@ -15,11 +15,15 @@
<!-- <div style="background-color: #f0f0f0;padding:0 10px;box-sizing: border-box;color: #000;">
<p>绑定用户</p>
</div> -->
<template v-if="pageType == 'label'">
<el-form-item label="手机号/邮箱:" prop="userKey" class="form_item">
<template v-if="pageType == 'label'">
<el-form-item
label="手机号/邮箱:"
prop="userKey"
class="form_item"
>
<div style="display: flex;align-items: center;">
<el-autocomplete
v-if="!isEdit"
v-if="!isEdit"
style="width: 400px;"
v-model="addPointsForm.userKey"
:fetch-suggestions="loadAll"
@@ -52,41 +56,36 @@
style="width: 110px;display: inline-block;text-align: right;"
>用户姓名</span
> -->
{{
addPointsForm.userName
? addPointsForm.userName
: "-"
}}
{{ addPointsForm.userName ? addPointsForm.userName : "-" }}
</div></el-form-item
>
</template>
<template v-if="pageType == 'user'">
<el-form-item label="用户:" prop="user" class="form_item" >
<div style="display: flex;align-items: center;" >
{{ dataInfo.tel ? dataInfo.tel : dataInfo.email }}
<span v-if="dataInfo.name"> {{ dataInfo.name }}</span>
<template v-if="pageType == 'user'">
<el-form-item label="用户:" prop="user" class="form_item">
<div style="display: flex;align-items: center;">
{{ dataInfo.tel ? dataInfo.tel : dataInfo.email }}
<span v-if="dataInfo.name"> {{ dataInfo.name }}</span>
</div>
</el-form-item>
</div>
</el-form-item>
<el-form-item label="湖分分类" prop="type" class="form_item">
<div>
<el-select
:show-all-levels="false"
v-model="addPointsForm.type"
:options="cateOptions"
placeholder="请选择湖分分类"
@change="handleChange"
>
<el-option
v-for="item in cateOptions"
:key="item.value"
:label="item.label"
:value="item.value"
<el-form-item label="湖分分类" prop="type" class="form_item">
<div>
<el-select
:show-all-levels="false"
v-model="addPointsForm.type"
:options="cateOptions"
placeholder="请选择湖分分类"
@change="handleChange"
>
</el-option
></el-select></div
></el-form-item>
<el-option
v-for="item in cateOptions"
:key="item.id"
:label="item.dictValue"
:value="item.dictType"
>
</el-option
></el-select></div
></el-form-item>
</template>
<el-form-item label="充值湖分" prop="score">
@@ -99,7 +98,8 @@
</el-form-item>
<el-form-item label="充值明细">
<el-input style="width: 400px;"
<el-input
style="width: 400px;"
type="textarea"
rows="5"
v-model="addPointsForm.detail"
@@ -201,7 +201,7 @@ export default {
addForm: {},
audioFileList: [],
isFresh: false,
dataRule: { }
dataRule: {}
};
},
components: {
@@ -247,49 +247,28 @@ export default {
this.totalLaoding = false;
}
},
handleChange() {},
handleChange(e) {
console.log('e at line 250:', e)
this.addPointsForm.type = e.toString();
this.$forceUpdate()
},
getCateList() {
// this.$http({
// url: this.$http.adornUrl(
// "/master/userCertificate/userCertificateLabelList"
// ),
// method: "post",
// data: this.$http.adornData({})
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.cateOptions = data.labelList;
// } else {
// this.cateOptions = [];
// }
// this.totalLaoding = false;
// if (data.code !== 0) return this.$message.error(data.msg);
// });
this.cateOptions = [
{
value: "01",
label: "在线教学"
},
{
value: "03",
label: "学术期刊"
},
{
value: "05",
label: "太湖讲堂"
},
{
value: "07",
label: "创作技术"
},
{
value: "11",
label: "注册邀请"
},
{
value: "13",
label: "课程邀请"
this.$http({
url: this.$http.adornUrl(
"/master/userContribution/getUserContributionLabelList"
),
method: "post",
data: this.$http.adornData({})
}).then(({ data }) => {
if (data && data.code === 0) {
this.cateOptions = data.labelList;
} else {
this.cateOptions = [];
}
];
this.totalLaoding = false;
if (data.code !== 0) return this.$message.error(data.msg);
});
},
loadAll(queryString, cb) {
if (queryString == "") {
@@ -334,43 +313,36 @@ export default {
this.addPointsForm = {};
this.fileList = [];
this.isEdit = type == "edit" ? true : false;
if(this.pageType == 'label'){
this.dataRule= {
score: [
{
required: true,
message: "请输入湖分"
// trigger: "change",
}
]
}
}else{
this.dataRule= {
type: [
{
required: true,
message: "请选择湖分分类"
// trigger: "change",
}
],
score: [
{
required: true,
message: "请输入湖分"
// trigger: "change",
}
]
}
}
if (data) {
this.addPointsForm = {
// courseId: data.id,
// courseName: data.title,
// courseImg: data.image,
// images: data.image
// userId: data.userId
if (this.pageType == "label") {
this.dataRule = {
score: [
{
required: true,
message: "请输入湖分"
// trigger: "change",
}
]
};
} else {
this.dataRule = {
// type: [
// {
// required: true,
// message: "请选择湖分分类"
// // trigger: "change",
// }
// ],
score: [
{
required: true,
message: "请输入湖分"
// trigger: "change",
}
]
};
}
if (data) {
this.remoteMethod(this.addPointsForm.courseName);
if (this.addPointsForm.images) {
this.fileList = this.addPointsForm.images
@@ -400,9 +372,19 @@ if(this.pageType == 'label'){
this.addPointsForm.userId = this.dataInfo.id;
}
console.log('data at line 395:', data)
this.addPointsForm.type = data.type? data.type : "";
this.dialogVisible = true;
},
handleSubmit: debounce(async function() {
if(this.addPointsForm.type == ""){
this.$message({
message: "请选择湖分分类",
type: "error"
});
return false;
}
this.$refs["addPointsForm"].validate(valid => {
if (valid) {
this.$http({
@@ -411,12 +393,15 @@ if(this.pageType == 'label'){
),
method: "post",
data: this.$http.adornData({
userId: this.dataInfo.id,
userId:
this.dataInfo && this.dataInfo.id
? this.dataInfo.id
: this.addPointsForm.userId,
score: this.addPointsForm.score,
detail: this.addPointsForm.detail
? this.addPointsForm.detail
: "",
type: this.addPointsForm.type
type: this.addPointsForm.type,
})
}).then(({ data }) => {
if (data && data.code === 0) {

View File

@@ -1,9 +1,9 @@
<template>
<div class="mod-config">
<commonTree
source="tags"
axiosType="raw"
:disableAddChild="true"
axiosResultKey="market"
@changeCurrentNode="changeCurrentNode"
ref="commonTree"
@@ -15,221 +15,327 @@
<div
v-if="isFresh"
v-loading="!isFresh"
style="width: calc(100% - 360px); height: 100%; overflow-y: scroll; float: right; border: 1px solid #bababa; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); border-radius: 10px;position: relative;"
style="width: calc(100% - 310px); height: 100%; overflow-y: scroll; float: right; border: 1px solid #bababa; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); border-radius: 10px;position: relative;"
>
<div class="border_box info_box">
<div class="title_box">
<div class="title"><span class="line"></span>基本标签信息</div>
</div>
<div class="addFormBox">
<el-form :model="addForm" ref="addForm" label-width="80px">
<el-form-item label="标签名称" prop="title" class="form_item">
<el-input
placeholder="请输入标签名称"
style="width: 100%"
v-model="addForm.title"
clearable
>
</el-input>
</el-form-item>
<el-form-item label="排序" prop="sort" class="form_item">
<el-input-number
placeholder="请输入标签排序"
style="width: 100%"
v-model="addForm.sort"
:min="0"
clearable
@keyup.native="UpNumber"
@keydown.native="UpNumber"
>
</el-input-number>
</el-form-item>
<el-form-item
label="是否为最终级"
prop="isLast"
label-width="120px"
class="form_item"
<div class="border_box info_box" v-if="!currentNode.data.disabled">
<div class="title_box">
<div class="title"><span class="line"></span>基本标签信息</div>
</div>
<div class="addFormBox">
<el-form :model="addForm" ref="addForm" label-width="80px">
<el-form-item label="标签名称" prop="title" class="form_item">
<el-input
placeholder="请输入标签名称"
style="width: 100%"
v-model="addForm.title"
clearable
>
<el-switch
v-model="addForm.isLast"
active-color="#13ce66"
:active-value="1"
:inactive-value="0"
active-text=""
inactive-text=""
@change="handleChangeIsLast"
>
</el-switch>
</el-form-item>
</el-form>
</el-input>
</el-form-item>
<el-form-item label="排序" prop="sort" class="form_item">
<el-input-number
placeholder="请输入标签排序"
style="width: 100%"
v-model="addForm.sort"
:min="0"
clearable
@keyup.native="UpNumber"
@keydown.native="UpNumber"
>
</el-input-number>
</el-form-item>
</el-form>
</div>
</div>
<div
style="padding-top: 0;padding-bottom: 0;"
class="border_box tree_content_box"
v-if="currentNode.data && currentNode.data.id"
>
<div class="title_box" style="margin-bottom: 10px; height: 40px">
<div class="title">
<span class="line"></span
>{{
currentNode.data && currentNode.data.id == "all" ? "全部" : ""
}}湖分列表
<el-button
plain
type="primary"
style="margin-left: 20px"
@click="openTable('addForm')"
size="mini"
v-if="currentNode.data && currentNode.data.id != 'all'"
>新增</el-button
>
<!-- <div style="" class="button_box"> -->
<!-- <el-button plain type="danger" @click="handleCheckAllChange(true)" size="mini">清空</el-button> -->
<!-- </div> -->
</div>
</div>
<div
style="padding-top: 0;padding-bottom: 0;" class="border_box tree_content_box"
v-if="currentNode && currentNode.data.isLast == 1"
<!-- :isNoSearch="true" -->
<commonShop
v-if="isFresh"
:CustomEdit="true"
:otherInfo="{
httpType: 'raw',
resultValueName: 'result',
statisticsQuery: statisticsQuery
}"
:defaultForm="{
tel: '',
detail: '',
type: currentNode.data ? currentNode.data.dictType : '',
labelId: addForm.id
}"
axiosType="raw"
getAssociatedGoodsListKey="id"
:isNoPaging="true"
:isShowPagination="true"
getAssociatedGoodsListValue="result"
:tableColumnList="tableColumnList"
:currentId="addForm.id ? addForm.id : ''"
currentType="bookMarketId"
:dataList="associatedGoodsList"
:urlList="urlList"
@delete="dataFormDelete"
@changeStatisticsQuery="statisticsQuery = false"
@edit="handleDataFormEdit"
:isEdit="false"
ref="commonShop"
:style="{
height:
currentNode.data && currentNode.data.id == 'all'
? 'calc(100vh - 200px) !important'
: 'calc(100vh - 340px)'
}"
>
<div class="title_box" style="margin-bottom: 10px; height: 40px">
<div class="title">
<span class="line"></span>证书列表
<el-button
plain
type="primary"
style="margin-left: 20px"
@click="openTable('addForm')"
size="mini"
>新增</el-button
<template slot="searchFormItem" slot-scope="slotProps">
<el-form-item
label="手机号:"
prop="title"
class="form_item"
style="width: 240px;"
>
<el-input
size="small"
placeholder="请输入手机号"
style="width: 100%"
v-model="slotProps.dataForm.tel"
clearable
>
<!-- <div style="" class="button_box"> -->
<!-- <el-button plain type="danger" @click="handleCheckAllChange(true)" size="mini">清空</el-button> -->
<!-- </div> -->
</div>
</div>
<!-- :isNoSearch="true" -->
<commonShop
:CustomEdit="true"
:otherInfo="{
httpType: 'raw',
resultValueName: 'certificateList'
}"
:defaultForm="{
tel:'',
title:'',
labelId: addForm.id
}"
axiosType="raw"
getAssociatedGoodsListKey="id"
:isNoPaging="true"
:isShowPagination="true"
getAssociatedGoodsListValue="result"
:tableColumnList="tableColumnList"
:currentId="addForm.id ? addForm.id : ''"
currentType="bookMarketId"
:dataList="associatedGoodsList"
:urlList="urlList"
@delete="dataFormDelete"
@edit="handleDataFormEdit"
:isEdit="isEdit"
ref="commonShop"
:style="`height: calc(100vh - 340px); `"
>
<template slot="searchFormItem" slot-scope="slotProps">
<el-form-item
label="手机号:"
prop="title"
class="form_item"
style="width: 240px;"
</el-input>
</el-form-item>
<!-- <el-form-item
label="描述:"
prop="title"
class="form_item"
style="width: 240px;"
>
<el-input
size="small"
placeholder="请输入描述"
style="width: 100%"
v-model="slotProps.dataForm.detail"
clearable
>
<el-input
size="small"
placeholder="请输入手机号"
style="width: 100%"
v-model="slotProps.dataForm.tel"
clearable
>
</el-input>
</el-form-item>
<el-form-item
label="证书名称:"
prop="title"
class="form_item"
style="width: 240px;"
</el-input>
</el-form-item> -->
<el-form-item
label="时间:"
prop="title"
class="form_item"
style="width: 240px;"
>
<el-date-picker
size="small"
value-format="yyyy-MM-dd"
v-model="slotProps.dataForm.startTime"
type="date"
style="width: 100%"
placeholder="选择日期"
>
<el-input
size="small"
placeholder="请输入证书名称"
style="width: 100%"
v-model="slotProps.dataForm.title"
clearable
>
</el-input>
</el-form-item>
</template>
<template slot="tableItem" slot-scope="slotProps">
<el-table-column
label="序号"
width="50"
align="center"
prop="certificateNo"
>
<template slot-scope="scope">
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
</template>
</el-table-column> <el-table-column
width="180"
prop="toSociologySort"
header-align="center"
align="center"
label="用户信息"
>
<template slot-scope="scope">
<div>
</el-date-picker>
</el-form-item>
<el-button
v-if="currentNode.data && currentNode.data.id == 'all'"
size="mini"
style="float: right;margin-top: 6px;margin-left: 6px;"
@click="handleExport()"
>全部导出</el-button
>
<el-button
v-if="currentNode.data && currentNode.data.id == 'all'"
size="mini"
:type="statisticsQuery ? 'primary' : 'info'"
style="float: right;margin-top: 6px;"
@click="handleStatisticsQuery"
>统计查询</el-button
>
</template>
<template slot="tableItem" slot-scope="slotProps">
<el-table-column
label="序号"
width="50"
align="center"
prop="certificateNo"
>
<template slot-scope="scope">
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column
width="180"
prop="toSociologySort"
header-align="center"
align="center"
label="用户信息"
>
<template slot-scope="scope">
<div>
<span
>姓名{{
scope.row.user.name ? scope.row.user.name : "-"
}}</span
>
</div>
<div v-if="scope.row.user.tel">
<span>手机号{{ scope.row.user.tel }}</span>
</div>
<div v-else-if="scope.row.user.email">
<span>邮箱{{ scope.row.user.email }}</span>
</div>
<!-- <span v-if="getStarLevel(scope.row.score)>0">{{ getStarLevel(scope.row.score) }} 星湖粉</span> -->
</template>
</el-table-column>
<el-table-column
label="湖分"
width="90"
align="center"
prop="score"
>
</el-table-column>
<el-table-column
label="星级"
width="160"
align="center"
prop="score"
>
<template slot-scope="scope">
<div style="">
<el-rate
v-if="getStarLevel(scope.row.score) > 0"
disabled
:max="7"
:colors="colors"
class="custom-rate"
text-color="#ff9900"
:value="getStarLevel(scope.row.score)"
>
</el-rate>
<span v-if="getStarLevel(scope.row.score) > 0"
>{{ getStarLevel(scope.row.score) }} </span
>
</div>
</template>
</el-table-column>
<el-table-column
label="湖分明细"
align="left"
prop="detail"
v-if="statisticsQuery"
>
<template slot-scope="scope">
<p style="overflow: hidden;margin-bottom: 0;">
<span
v-if="scope.row.statQueryScore > 0"
style="text-align: right;float: left;"
>共涨
<span
>姓名{{
scope.row.user.name ? scope.row.user.name : "-"
}}</span
style="font-weight: bold;"
:style="{
color: getColor(getStarLevel(scope.row.statQueryScore))
}"
>{{ getStarLevel(scope.row.statQueryScore) }}</span
>
(<span
:style="{
color: getColor(getStarLevel(scope.row.statQueryScore))
}"
>{{ scope.row.statQueryScore }}</span
>
湖分)
</span>
<span style="text-align: right;float: right;"
>{{ scope.row.contributions.length }}条记录</span
>
</p>
<div
style="text-align: left;max-height: 200px;overflow-y: auto;position: relative;"
>
<div
v-for="(v, i) in scope.row.contributions"
style="text-align: left;cursor: pointer;"
:style="
v.statQueryFlag == 1
? {
color: getColor(
getStarLevel(scope.row.statQueryScore)
)
}
: ''
"
>
<span style="margin-right: 4px;"
>{{ i + 1 }}{{ getTreeLabel(v.type) }}</span
>-
{{ v.detail }} ({{ v.score }})
</div>
<div v-if="scope.row.user.tel">
<span>手机号{{ scope.row.user.tel }}</span>
</div>
<div v-else-if="scope.row.user.email">
<span>邮箱{{ scope.row.user.email }}</span>
</div>
</template>
</el-table-column>
<el-table-column
label="湖分"
width="120"
align="center"
prop="certificateNo"
>
</div>
</template>
</el-table-column>
<el-table-column
v-else
prop="detail"
header-align="center"
align="center"
label="描述"
>
</el-table-column>
<el-table-column
v-if="!statisticsQuery"
prop="createTime"
header-align="center"
align="center"
width="140"
label="创建日期"
>
</el-table-column>
</template>
</commonShop>
</el-table-column>
<el-table-column
label="描述"
align="center"
prop="certificateNo"
>
</el-table-column>
<el-table-column
prop="createTime"
header-align="center"
align="center"
width="140"
label="创建日期"
>
</el-table-column>
</template>
</commonShop>
<!-- <div
<!-- <div
style=" border: 1px dashed #bababa;"
v-if="currentNode && currentNode.data.isLast == 1"
></div> -->
</div>
<div class="submitButton submitButtonBox">
<el-button
type="primary"
@click="dataFormSubmit('addForm')"
size="small"
style="float: right;margin-right: 20px;"
>确定</el-button
>
<!-- </div> -->
</div>
</div>
<div class="submitButton submitButtonBox">
<el-button
type="primary"
@click="dataFormSubmit('addForm')"
size="small"
style="float: right;margin-right: 20px;"
>确定</el-button
>
<!-- </div> -->
</div>
</div>
<!-- <el-form
@@ -240,7 +346,8 @@
</el-form> -->
<addCertificate v-if="currentNode.data&&currentNode.data.id"
<addCertificate
v-if="currentNode.data && currentNode.data.id"
ref="addCertificate"
:data="addCertificateForm"
:labelId="currentNode.data.id"
@@ -373,8 +480,9 @@ export default {
data() {
return {
disabled: false,
statisticsQuery: false,
restaurants: [],
treeLabelTypeList: [],
options: [],
state: "",
timeout: null,
@@ -385,16 +493,15 @@ export default {
isIndeterminate: true,
dialogVisible: false,
urlList: {
treeList: "/master/userCertificate/userCertificateLabelList",
delete: "/master/userCertificate/delUserCertificateLabel",
deleteShop: "/master/userCertificate/delCertificate",
saveShop: "/master/userCertificate/editCertificate",
add: "/master/userCertificate/saveUserCertificateLabel",
edit: "/master/userCertificate/editUserCertificateLabel",
hasBindProductList:
"/master/userCertificate/userCertificateList",
CanBindProductList: "/master/courseMedical/getCourseListCanMedical",
editCourse: "/master/courseMedical/updateCourseToMedicalSort"
treeList: "/master/userContribution/getUserContributionLabelList",
delete: "/master/userContribution/delUserContributionLabelList",
deleteShop: "/master/userContribution/delUserContribution",
saveShop: "/master/userContribution/saveUserContribution",
add: "/master/userContribution/addUserContributionLabelList",
edit: "/master/userContribution/editUserContributionLabelList",
hasBindProductList: "/master/userContribution/listByPage",
CanBindProductList: "/master/courseMedical/getCourseListCanMedical"
// editCourse: "/master/courseMedical/updateCourseToMedicalSort"
},
activeName: "first",
addForm: {},
@@ -435,6 +542,22 @@ export default {
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false,
colors: {
0.5: { value: "#f7ba2a" }, // 半星,黄色
1: { value: "#66CC66" }, // 一星,绿色
1.5: { value: "#FF6347" }, // 一星半,红色
2: { value: "#0094ff" }, // 二星,蓝色
2.5: { value: "#0094ff" }, // 二星,蓝色
3: { value: "#802eff" }, // 三星,紫色
3.5: { value: "#802eff" }, // 三星,紫色
4: { value: "#FF7F50", excluded: true }, // 四星,橙色,排除的颜色
4.5: { value: "#FF7F50", excluded: true }, // 四星,橙色,排除的颜色
5: { value: "#ff8300" }, // 五星,金色
6: { value: "#00CED1" }, // 六星,青色
7: { value: "#ff3666" } // 七星,粉红色
},
tableColumnList: [
{ label: "商品ID", width: 70, align: "center", prop: "productId" },
{
@@ -498,6 +621,10 @@ export default {
}
};
},
filters: {
// 自定义过滤器:货币格式化
labelType(value) {}
},
components: {
AddOrUpdate,
addCertificate,
@@ -512,16 +639,61 @@ export default {
this.$refs.tree.filter(val);
}
},
activated() {
async activated() {
this.isEdit = false;
this.getDataList();
await this.getDataList();
this.$nextTick(() => {
this.$refs.commonTree.setCurrentNodeShow("all");
setTimeout(() => {
this.$refs.commonShop.getDataList();
}, 3000);
});
},
async created() {
this.isEdit = false;
await this.getDataList();
this.$nextTick(() => {
this.$refs.commonTree.setCurrentNodeShow("all");
});
},
methods: {
refresh(){
this.$nextTick(()=>{
this.$refs.commonShop.getAssociatedGoodsList()
})
async handleExport() {
this.$refs.commonShop.handleExport();
},
getColor(star) {
return this.colors[star].value || "#333"; // 默认黑色
},
getStarLevel(score) {
let level = 0; // 初始化星级
let starLevel = 0;
if (score < 15) {
level = 0; // 分数低于 15 没有星级
} else if (score >= 15 && score < 150) {
// 15 到 149 分之间,每 15 分增加 0.5 星
starLevel = Math.floor((score - 15) / 15) + 1; // 确保 15 分就返回 0.5 星
level = starLevel / 2; // 每次增加 0.5 星
} else if (score >= 150 && score < 300) {
level = 5; // 五星
} else if (score >= 300 && score < 500) {
level = 6; // 六星
} else if (score >= 500) {
level = 7; // 七星
}
return level;
},
refresh() {
this.$nextTick(() => {
this.$refs.commonShop.getAssociatedGoodsList();
});
},
handleStatisticsQuery() {
this.statisticsQuery = true;
this.$nextTick(() => {
this.$refs.commonShop.statisticsQuery();
});
},
getCate(id) {
this.linshiids = [];
@@ -677,7 +849,9 @@ export default {
openTable() {
this.restaurants = [];
this.$refs.addCertificate.init("add", {});
this.$refs.addCertificate.init("add", {
type: this.currentNode.data.dictType
});
this.$forceUpdate();
// this.dialogVisible = true;
// this.isEdit = false;
@@ -699,10 +873,6 @@ export default {
this.$nextTick(() => {
if (e == 1) {
if (this.$refs.commonShop) {
// this.$refs.commonShop.getAssociatedGoodsList.dataForm={
// ...this.$refs.commonShop.getAssociatedGoodsList.dataForm,
// id:this.addForm.id ? this.addForm.id : null
// }
this.$refs.commonShop.getAssociatedGoodsList();
}
}
@@ -716,6 +886,7 @@ export default {
console.log("🚀 ~ getCommonShopDataList ~ type, id:", type, id);
this.currentNode = { data: { ...form } };
console.log("this.currentNode at line 705:", this.currentNode);
this.addForm = form;
if (this.addForm.isLast == 0) {
this.activeName = "first";
@@ -730,18 +901,12 @@ export default {
// }
await this.getDataList();
// this.$refs.commonTree.setCurrentNodeShow();
this.$nextTick(() => {
// this.$refs.commonShop.clear();
// this.$refs.commonShop.bookMarketId = null;
if (form.isLast == 1) {
if (this.$refs.commonShop) {
// this.$refs.commonShop.getAssociatedGoodsList.dataForm={
// ...this.$refs.commonShop.getAssociatedGoodsList.dataForm,
// id:this.addForm.id ? this.addForm.id : null
// }
this.$refs.commonShop.getAssociatedGoodsList();
}
if (this.$refs.commonShop && this.currentNode.data.id) {
this.$refs.commonShop.getAssociatedGoodsList();
} else {
this.currentNode = {};
}
});
},
@@ -782,14 +947,18 @@ export default {
),
method: "post",
data: this.$http.adornData({
...this.addForm
...this.addForm,
dictValue: this.addForm.title
})
}).then(async ({ data }) => {
console.log("data at line 755:", data);
if (data && data.code === 0) {
// var status = await this.correlationShop(data.result.id);
await this.getDataList();
this.$nextTick(async () => {
this.$refs.commonTree.setCurrentNodeShow(data.labelId);
this.$refs.commonTree.setCurrentNodeShow(
data.sysDictDataEntity.id
);
this.$message({
message: "操作成功",
type: "success",
@@ -830,7 +999,7 @@ export default {
dataFormDelete: debounce(async function(row, deleteType) {
console.log("row at line 515:", row);
this.$confirm(
`确定要删除${deleteType != "all" ? "该" : "所有"}证书吗?`,
`确定要删除${deleteType != "all" ? "该" : "所有"}湖分吗?`,
"提示",
{
confirmButtonText: "确定",
@@ -873,10 +1042,6 @@ export default {
this.$nextTick(() => {
// this.$refs.commonShop.selectShopArr = [];
if (this.$refs.commonShop) {
// this.$refs.commonShop.getAssociatedGoodsList.dataForm={
// ...this.$refs.commonShop.getAssociatedGoodsList.dataForm,
// id:this.addForm.id ? this.addForm.id : null
// }
this.$refs.commonShop.getAssociatedGoodsList();
}
});
@@ -897,8 +1062,10 @@ export default {
this.isFresh = true;
},
handleClickNodes(node, data, type) {
console.log("node at line 878:", node, data, type);
this.isEdit = false;
this.addForm = {};
// console.log(this.$refs.tree.handleClickNodes(), "当前选中节点");
console.log(node, data, "当前选中节点");
this.currentNode = node ? node : {};
@@ -944,7 +1111,7 @@ export default {
title: "",
icon: ""
};
this.handleClickNodes({ data: addform }, addform, "add");
// if (!this.currentNode) {
// this.$message.error("请先选择分类");
// return;
@@ -1200,27 +1367,40 @@ export default {
}
},
// 获取数据列表
getTreeLabel(type) {
const label = this.treeLabelTypeList.find(item => item.type === type);
return label ? label.title : "未知类型";
},
async getDataList() {
this.dataListLoading = true;
await this.$http({
url: this.$http.adornUrl(this.urlList.treeList),
method: "get"
// params: this.$http.adornParams({
// 'page': this.pageIndex,
// 'limit': this.pageSize,
// 'key': this.dataForm.key
// })
}).then(({ data }) => {
console.log("🚀 ~ getDataList ~ data:", data);
if (data && data.code === 0) {
this.treeDataList = data.labelList;
this.treeDataList = [
{ title: "全部", id: "all", disabled: true },
...data.labelList.map(e => ({ ...e, title: e.dictValue }))
];
this.treeLabelTypeList = this.treeDataList
.filter(e => e.dictType !== "") // 过滤掉 type 为空的项
.map(e => ({
type: e.dictType,
title: e.dictValue
}));
console.log(
"this.treeLabelTypeList at line 1293:",
this.treeLabelTypeList
);
// this.totalPage = data.page.totalCount
} else {
this.treeDataList = [];
// this.totalPage = 0
}
this.dataListLoading = false;
this.$nextTick(() => {});
// this.$refs.commonTree.setCurrentNodeShow('all');
});
},
// 每页数
@@ -1287,7 +1467,7 @@ export default {
}
.tree_box {
width: 350px !important;
width: 300px !important;
height: 100%;
float: left;
border: 1px solid #bababa;
@@ -1349,7 +1529,7 @@ export default {
width: 100%;
// float: right;
background: #fffefe;
margin-top: 4px;
margin-top: 4px;
border-radius: 10px;
padding: 15px 15px;
box-sizing: border-box;
@@ -1491,6 +1671,7 @@ p {
/deep/ .quill-editor {
min-height: 200px !important;
}
.loading-spinner {
position: absolute;
top: 50%;
@@ -1498,4 +1679,11 @@ p {
transform: translate(-50%, -50%);
font-size: 24px;
}
/deep/ .custom-rate .el-rate__item .el-rate__icon {
font-size: 13px !important;
height: 14px !important;
}
/deep/ .custom-rate {
height: 14px !important;
}
</style>

View File

@@ -429,46 +429,21 @@ export default {
.catch(() => {});
}, 200),
getCateList() {
// this.$http({
// url: this.$http.adornUrl(
// "/master/userCertificate/userCertificateLabelList"
// ),
// method: "post",
// data: this.$http.adornData({})
// }).then(({ data }) => {
// if (data && data.code === 0) {
this.cateOptions = [
{
value: "01",
label: "在线教学"
},
{
value: "03",
label: "学术期刊"
},
{
value: "05",
label: "太湖讲堂"
},
{
value: "07",
label: "创作技术"
},
{
value: "11",
label: "注册邀请"
},
{
value: "13",
label: "课程邀请"
this.$http({
url: this.$http.adornUrl(
"/master/userContribution/getUserContributionLabelList"
),
method: "post",
data: this.$http.adornData({})
}).then(({ data }) => {
if (data && data.code === 0) {
this.cateOptions = data.labelList;
} else {
this.cateOptions = [];
}
];
// } else {
// this.cateOptions = [];
// }
// if (data.code !== 0) return this.$message.error(data.msg);
// });
this.totalLaoding = false;
if (data.code !== 0) return this.$message.error(data.msg);
});
},
delay(val) {
this.$nextTick(() => {

View File

@@ -25,9 +25,9 @@
>
<el-option
v-for="item in cateOptions"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.dictValue"
:value="item.dictType"
>
</el-option
></el-select></div
@@ -366,25 +366,12 @@ export default {
getPointsType(type) {
var str = "";
//在线教学 01 学术期刊 03 太湖讲堂 05 创作技术 07 注册邀请 11 课程邀请 13
switch (type) {
case "01":
return "在线教学";
case "03":
return "学术期刊";
case "05":
return "太湖讲堂";
case "07":
return "创作技术";
case "11":
return "注册邀请";
case "13":
return "课程邀请";
}
this.cateOptions.forEach(item => {
if (item.dictType == type) {
str = item.dictValue;
}
});
return str;
},
dataFormDelete: debounce(async function(row, deleteType) {
console.log("row at line 515:", row);
@@ -429,46 +416,21 @@ export default {
.catch(() => {});
}, 200),
getCateList() {
// this.$http({
// url: this.$http.adornUrl(
// "/master/userCertificate/userCertificateLabelList"
// ),
// method: "post",
// data: this.$http.adornData({})
// }).then(({ data }) => {
// if (data && data.code === 0) {
this.cateOptions = [
{
value: "01",
label: "在线教学"
},
{
value: "03",
label: "学术期刊"
},
{
value: "05",
label: "太湖讲堂"
},
{
value: "07",
label: "创作技术"
},
{
value: "11",
label: "注册邀请"
},
{
value: "13",
label: "课程邀请"
this.$http({
url: this.$http.adornUrl(
"/master/userContribution/getUserContributionLabelList"
),
method: "post",
data: this.$http.adornData({})
}).then(({ data }) => {
if (data && data.code === 0) {
this.cateOptions = data.labelList;
} else {
this.cateOptions = [];
}
];
// } else {
// this.cateOptions = [];
// }
// if (data.code !== 0) return this.$message.error(data.msg);
// });
this.totalLaoding = false;
if (data.code !== 0) return this.$message.error(data.msg);
});
},
delay(val) {
this.$nextTick(() => {

View File

@@ -5,8 +5,8 @@
window.SITE_CONFIG = {};
// api接口请求地址
//window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com';
window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com';
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
//window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';
// cdn地址 = 域名 + 版本号

View File

@@ -5,8 +5,8 @@
window.SITE_CONFIG = {};
// api接口请求地址
//window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川
//window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb'; //本地
// cdn地址 = 域名 + 版本号