From 57e94c83c2e73e573454d22711cba8a15c44d4fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E7=BF=94=E5=AE=87-=E6=97=85=E7=AE=A1=E5=AE=B6?=
<153298343@qq.com>
Date: Thu, 27 Oct 2022 10:31:39 +0800
Subject: [PATCH] up
---
.../productService/commonServiceProduct.vue | 299 +++++++++-
.../common/addCommonServiceProduct.vue | 537 +++++++++++++++++-
src/views/productService/index.html | 14 -
3 files changed, 821 insertions(+), 29 deletions(-)
delete mode 100644 src/views/productService/index.html
diff --git a/src/views/productService/commonServiceProduct.vue b/src/views/productService/commonServiceProduct.vue
index 02409e3..1306027 100644
--- a/src/views/productService/commonServiceProduct.vue
+++ b/src/views/productService/commonServiceProduct.vue
@@ -1,8 +1,293 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
当前搜索条件:
+
+
+ {{select.confinementServices.name}}
+ ,
+
+
+
+ {{select.state === 0 ? '有效' : '无效'}}
+
+
+
+
+
+
+
+
+ 所属机构
+
+
+ select.confinementServices = e">
+
+
+
+
+
+
+
+
+
+
+ 状态
+
+
+ 未启用
+ 启用
+ 全部
+
+
+
+
+
+
+
+
+
+
+
+
+
select.pageSize = e"
+ @pageIndexChange="pageChange">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
\ No newline at end of file
+import addCommonServiceProduct from '@/views/productService/components/common/addCommonServiceProduct'
+
+ import {
+ index as clubIndex
+ } from '@/api/productService/commonService'
+ export default {
+ components: {
+ addCommonServiceProduct
+ },
+ data() {
+ return {
+ clubs: [],
+ clubSelect: {
+ pageSize: 10,
+ page: 1,
+ type: "maternity"
+ },
+
+ select: {
+ page: 1,
+ pageSize: 10,
+ keywords: '',
+ confinementServices: '',
+ state: ''
+ },
+ pageTitle: "",
+ total: 0,
+ list: [],
+ table: [{
+ prop: 'name',
+ label: '名称',
+ minWidth: 240,
+ fixed: 'left',
+ align: 'left'
+ },
+ {
+ label: '所属机构',
+ prop: 'service.name',
+ width: 220,
+ align: 'left'
+ },
+ {
+ label: '特色标签',
+ width: 260,
+ align: 'left',
+ prop: 'featured_label',
+ customFn: (row) => {
+ return ( <
+ div > {
+ row.featured_label ?
+ row.featured_label?.split(',').map(item => {
+ return {
+ item
+ }
+ }) : < div style = {
+ {
+ 'text-align': 'center'
+ }
+ } > 无 < /div>
+ } <
+ /div>
+ )
+ }
+ },
+ {
+ label: '排序',
+ width: 150,
+ prop: 'sort_number'
+ },
+ {
+ label: '提交人',
+ width: 200,
+ prop: 'admin.name'
+ },
+ {
+ label: '提交日期',
+ prop: 'created_at',
+ width: 200,
+ formatter: (cell, data, value) => {
+ return parseTime(new Date(value), '{y}-{m}-{d}')
+ }
+ }
+ ]
+ }
+ },
+ methods: {
+ async getClubs() {
+ const res = await clubIndex({
+ page: this.clubSelect.page,
+ page_size: this.clubSelect.pageSize,
+ type: this.clubSelect.type,
+ }, false)
+ if (res?.rows?.length === 0) {
+ this.$Message.info({
+ content: '没有更多机构了',
+ duration: 1
+ })
+ this.clubSelect.page--
+ }
+ this.clubs.push(...res.rows)
+ },
+ loadMoreClub() {
+ this.clubSelect.page++
+ this.getClubs()
+ },
+
+ pageChange(e) {
+ this.select.page = e
+ this.getClubProduct()
+ },
+
+ async getClubProduct() {
+ const res = await index({
+ keyword: this.select.keywords,
+ page: this.select.page,
+ page_size: this.select.pageSize,
+ confinement_services_id: this.select.confinementServices.id,
+ state: this.select.state,
+ type:this.clubSelect.type,
+ })
+ this.total = res.total
+ this.list = res.rows
+ console.log(res)
+ },
+
+ destroyProduct(row) {
+ destroy({
+ id: row.id
+ }).then(res => {
+ Message({
+ type: 'success',
+ message: '删除产品成功'
+ })
+ this.getClubProduct()
+ })
+ },
+ editorClick(row) {
+ this.$refs['addClubProduct'].type = 'editor'
+ this.$refs['addClubProduct'].id = row.id
+ this.$refs['addClubProduct'].isShow = true
+ },
+ comboClick(row) {
+ this.$refs['addProductCombo'].id = row.id
+ this.$refs['addProductCombo'].isShow = true
+ },
+ picClick(row) {
+ this.$refs['addProductPic'].id = row.id
+ this.$refs['addProductPic'].isShow = true
+ }
+ },
+ mounted() {
+ this.getClubProduct()
+ this.getClubs()
+ this.pageTitle = this.$route.meta.title;
+ }
+
+ }
+
+
+
diff --git a/src/views/productService/components/common/addCommonServiceProduct.vue b/src/views/productService/components/common/addCommonServiceProduct.vue
index 02409e3..6fbeaff 100644
--- a/src/views/productService/components/common/addCommonServiceProduct.vue
+++ b/src/views/productService/components/common/addCommonServiceProduct.vue
@@ -1,8 +1,529 @@
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+ *所属机构:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 特色标签:
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *封面图:
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/productService/index.html b/src/views/productService/index.html
deleted file mode 100644
index 610440a..0000000
--- a/src/views/productService/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- 温馨提示
-
-
-
- 您的手机暂时不支持小程序的显示
-
请更换设备重新尝试
-
-
-