医学标签添加附加信息

This commit is contained in:
@fawn-nine
2024-05-31 13:51:09 +08:00
parent b147154603
commit 13ec025af2
3 changed files with 117 additions and 76 deletions

View File

@@ -1,7 +1,9 @@
<template>
<div
class="commonShopproduct"
:style="`width: 100%; height: 100%; margin-top: ${!isNoSearch?'-50px':'0'}`"
:style="
`width: 100%; height: 100%; margin-top: ${!isNoSearch ? '-50px' : '0'}`
"
>
<!-- <el-form
:inline="true"
@@ -83,11 +85,13 @@
header-align="center"
align="center"
label="操作"
width="120"
>
<template slot-scope="scope">
<slot name="operation" :row="scope.row"></slot>
<el-button type="text" @click="editCourse(scope.row)"
>编辑</el-button
>
<el-button
type="text"
style="color: red;"
@@ -98,60 +102,41 @@
</template>
</el-table-column>
</el-table>
<!-- <li
v-for="(v, i) in associatedGoodsList"
@click="isEdit ? selectShop(v) : ''"
:class="
selectShopArr.includes(v.id)
? 'isSelect shop_box_item'
: 'shop_box_item'
"
>
<el-checkbox
v-if="isEdit"
size="medium"
@change="(e) => selectShop(v)"
:value="selectShopArr.includes(v.id)"
class="shop_box_item_check"
></el-checkbox>
<img
class="shop_box_item_img img-loaded"
style="object-fit: cover"
data-lazy-collect="1"
:src="v.product.productImages"
/>
<div class="shop_box_item_content">
<li class="shop_box_item_title">
<span></span><span>{{ v.product.productName }}</span>
</li>
<li class="shop_box_item_title shop_box_item_info">
<span>价格</span>
<span style="color: #fd3f31">¥{{ v.product.price }}</span>
</li>
<li
v-if="v.product.activityPrice"
class="shop_box_item_title shop_box_item_info"
>
<span>活动价</span>
<span style="color: #fd3f31">¥{{ v.product.activityPrice }}</span>
</li>
<li class="shop_box_item_title shop_box_item_info">
<span>库存</span>
<span>{{ v.product.productStock }}</span>
</li>
</div>
</li> -->
<el-dialog title="提示" :visible.sync="editVisible" width="30%">
<div style="width:80%">
<div style="margin-bottom:15px">
<span style="font-weight:bold"
>正在编辑课程{{ editForm.title }}</span
>
</div>
<el-form ref="form" :model="editForm" label-width="80px">
<el-form-item label="排序:">
<el-input-number
placeholder="请输入标签排序"
style="width: 100%"
v-model="editForm.sort"
:min="0"
>
</el-input-number> </el-form-item
><el-form-item label="课程等级:">
<el-radio :label="0" v-model="editForm.level">不显示</el-radio>
<el-radio :label="1" v-model="editForm.level">初级</el-radio>
<el-radio :label="2" v-model="editForm.level"
>高级</el-radio
> </el-form-item
><el-form-item label="课程属性:">
<el-radio :label="0" v-model="editForm.selective">不显示</el-radio>
<el-radio :label="1" v-model="editForm.selective">必修</el-radio>
<el-radio :label="2" v-model="editForm.selective">选修</el-radio>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="editHandleClose"> </el-button>
<el-button type="primary" @click="submitEdit"> </el-button>
</span>
</el-dialog>
<!-- 弹窗, 新增 / 修改 -->
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @showchooseBookf = "showchooseBookf"></add-or-update>
<choose-book v-if="chooseBookVisible" :bookIds = bookIds ref="chooseBook" :chooseBookVisible = chooseBookVisible @closeBookf = "closeBookf"></choose-book> -->
@@ -172,7 +157,7 @@ export default {
"isNoSearch",
"isNoPaging",
"axiosType",
"otherInfo",
"otherInfo"
],
data() {
return {
@@ -194,7 +179,9 @@ export default {
chooseBookVisible: false,
bookIds: [],
selectShopArr: [],
dataForm: {}
dataForm: {},
editVisible: false,
editForm: {}
};
},
watch: {
@@ -219,6 +206,32 @@ export default {
// await this.getGoodsTypeList();
},
methods: {
editHandleClose(){
this.editForm = {}
this.editVisible = false
},
submitEdit() {
this.$http({
url: this.$http.adornUrl(`${this.urlList.editCourse}`),
method: "post",
data: this.$http.adornData(this.editForm)
}).then(data => {
this.$message.success("操作成功!");
this.editHandleClose()
this.getAssociatedGoodsList()
});
},
editCourse(row) {
console.log("row", row);
this.editVisible = true;
this.editForm = {
title: row.title,
id: row.bindId,
sort:row.toSociologySort,
level:row.level,
selective:row.selective
};
},
shopDelete(row) {
this.$emit("delete", [row]);
},
@@ -280,6 +293,7 @@ export default {
// 获取数据列表
async getDataList(bookMarketId) {
this.bookMarketId = bookMarketId;
this.dataListLoading = true;
this.getDataList = [];
@@ -325,15 +339,12 @@ export default {
this.dataListLoading = true;
if (this.otherInfo.httpType == "raw"&&this.otherInfo.isNoPaging ) {
if (this.otherInfo.httpType == "raw" && this.otherInfo.isNoPaging) {
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.hasBindProductList}`),
method: "POST",
data: { current: 1,
limit: 99999999,
...form
},
data: { current: 1, limit: 99999999, ...form },
header: {
//默认 无 说明:请求头
"Content-Type": "application/json"
@@ -346,15 +357,12 @@ export default {
this.dataListLoading = false;
}
});
}
else if (this.otherInfo.httpType == "raw") {
} else if (this.otherInfo.httpType == "raw") {
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.hasBindProductList}`),
method: "POST",
data: {
...form
},
header: {
@@ -364,14 +372,14 @@ export default {
})
.then(async ({ data }) => {
if (data && data.code === 0) {
this.associatedGoodsList = [...data[this.otherInfo.httpDataValueName]];
this.associatedGoodsList = [
...data[this.otherInfo.httpDataValueName]
];
this.dataListLoading = false;
}
});
}
else {
} else {
await this.$http({
url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`),
method: "post",

View File

@@ -209,6 +209,37 @@
/>
</template>
</el-table-column>
<el-table-column
prop="toSociologySort"
header-align="center"
align="center"
label="排序"
>
</el-table-column>
<el-table-column
header-align="center"
align="center"
label="课程等级"
>
<template slot-scope="scope">
<span v-if="scope.row.level == 0">不显示</span>
<span v-if="scope.row.level == 1">初级</span>
<span v-if="scope.row.level == 2">高级</span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
label="课程属性"
>
<template slot-scope="scope">
<span v-if="scope.row.selective == 0">不显示</span>
<span v-if="scope.row.selective == 1">必修</span>
<span v-if="scope.row.selective == 2">选修</span>
</template>
</el-table-column>
</template>
</commonShop>
@@ -353,9 +384,11 @@ export default {
add: "/master/courseMedical/addCourseMedical",
edit: "/master/courseMedical/editCourseMedical",
hasBindProductList: "/master/courseMedical/getCourseListForMedical",
CanBindProductList: "/master/courseMedical/getCourseListCanMedical"
CanBindProductList: "/master/courseMedical/getCourseListCanMedical",
editCourse:'/master/courseMedical/updateCourseToMedicalSort'
},
addForm: {},
isFresh: false,
dataRule: {
name: [

View File

@@ -7,8 +7,8 @@
// api接口请求地址
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11
// window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';//磊哥
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';