Browse Source

Merge branch 'master' into 团队管理

xiaohaizhao 1 year ago
parent
commit
4ffc41bad2

+ 13 - 0
cloud/feedback/detail.vue

@@ -0,0 +1,13 @@
+<template>
+    <view>
+        意见反馈详情
+    </view>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style></style>

+ 13 - 0
cloud/feedback/index.vue

@@ -0,0 +1,13 @@
+<template>
+    <view>
+        意见反馈列表
+    </view>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style></style>

+ 13 - 0
cloud/feedback/insert.vue

@@ -0,0 +1,13 @@
+<template>
+    <view>
+        新建
+    </view>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style></style>

+ 311 - 0
packageA/exam/result.vue

@@ -0,0 +1,311 @@
+<template>
+    <view>
+        <view class="head" catchtouchmove="true" @touchmove.stop.prevent="() => { }">
+            <My_search :value="content.where.condition" @onSearch="onSearch">
+                <view class="filtrate" v-if="filtrateList.length" hover-class="navigator-hover" @click="openFiltrate">
+                    筛选
+                    <text class="iconfont icon-shaixuan" />
+                </view>
+            </My_search>
+            <view class="crumbs">
+                <view class="crumb" v-for="item in crumbs" :key="item.classname">{{ item.classname }}</view>
+            </view>
+            <u-tabs :list="status" :activeStyle="{ fontWeight: 'bold', color: '#C30D23' }" lineColor="#C30D23"
+                keyName="name" @change="statusChange" />
+        </view>
+        <view style="height: 1px;" />
+        <filtrate ref="Filtrate" :filtrateList="filtrateList" @onFiltration="onFiltration" @onInterrupt="onInterrupt" />
+
+        <My_listbox ref="List" @getlist="getList">
+            <view class="list-box">
+                <navigator class="item" v-for="item in list" :key="item.sat_courseware_testheadid"
+                    :url="'/packageA/exam/detail?id=' + item.sat_courseware_testheadid">
+                    <view class="title u-line-2">{{ item.title || '--' }}</view>
+                    <view class="hr" />
+                    <view class="bottom">
+                        <view>
+                            分数:<text class="score">{{ item.score }}</text>
+                        </view>
+                        <view>
+                            答题数:{{ item.answerinfo }}
+                        </view>
+                    </view>
+
+                    <view class="status" v-if="item.status == '未开始'" style="background:#E3041F;color: #FFFFFF;">
+                        未开始
+                    </view>
+                    <view class="status" v-else-if="item.status == '进行中'" style="background: #FFF0F2;color: #E3041F;">
+                        进行中
+                    </view>
+                    <view class="status" v-else-if="item.status == '已完成'" style="background: #EEEEEE;color: #999999;">
+                        已完成
+                    </view>
+
+                </navigator>
+            </view>
+        </My_listbox>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            crumbs: [],
+            list: [],
+            "content": {
+                "where": {
+                    "condition": "",
+                    "status": "",
+                    "sat_courseware_classids": [[]]
+                }
+            },
+            filtrateList: [],
+            status: [{
+                name: "全部"
+            }, {
+                name: "未开始"
+            }, {
+                name: "进行中"
+            }, {
+                name: "已完成"
+            }]
+        }
+    },
+    onLoad(options) {
+        this.crumbs = [{
+            classname: "考试",
+            parentid: ""
+        }, {
+            classname: "全部",
+            parentid: ''
+        }]
+        this.getType()
+        this.getList(true)
+        uni.setNavigationBarTitle({
+            title: '考试',
+        })
+    },
+    onShow() {
+        this.updateList()
+    },
+    methods: {
+        getType() {
+            this.$Http.basic({
+                "id": "20221102143302",
+                content: {
+                    pageSize: 9999,
+                    parentid: "",
+                    "where": {
+                        "isenable": 1
+                    }
+                }
+            }).then(res => {
+                console.log("获取分类列表", res)
+                if (this.cutoff(res.msg)) return;
+                this.filtrateList = [{
+                    title: "一级分类",
+                    key: '一级分类',//提交时返回的Key
+                    showKey: "classname",//显示的key
+                    selected: "sat_courseware_classid",//选择时选择的字段
+                    value: "",//提交时选中的value
+                    defaultVal: "",//返回的默认值
+                    isAll: true,
+                    interrupt: true,
+                    rang: [{ classname: "全部", sat_courseware_classid: "", children: [] }].concat(res.data),//选择的范围
+                }]
+            })
+        },
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            let ids = this.crumbs.map(v => v.parentid).filter(v => v);
+            this.content.where.sat_courseware_classids = ids.length ? [[ids[ids.length - 1]]] : []
+            this.$Http.basic({
+                "id": 20240326133302,
+                content: this.content
+            }).then(res => {
+                this.$refs.List.RefreshToComplete()
+                console.log("获取试卷列表", res)
+                if (this.cutoff(res.msg)) return;
+                this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                this.content = this.$refs.List.paging(this.content, res)
+            })
+        },
+        updateList() {
+            if (this.content.pageNumber && this.content.pageNumber >= 2) {
+                let content = this.paging(this.content, true, true)
+                this.$Http.basic({
+                    "id": "20240326133302",
+                    content
+                }).then(res => {
+                    console.log("更新试卷列表", res)
+                    if (this.cutoff(res.msg)) return;
+                    this.list = res.data;
+                })
+            }
+        },
+        openFiltrate() {
+            this.$refs.Filtrate.changeShow();
+        },
+        onSearch(condition) {
+            this.content.where.condition = condition;
+            this.getList(true)
+        },
+        onInterrupt({ item, index, option }) {
+            let filtrateList = this.$refs.Filtrate.list;
+            const i = filtrateList.findIndex(v => v.title == '二级分类');
+            if (option.children.length) {
+                const obj = {
+                    title: "二级分类",
+                    key: '二级分类',
+                    showKey: "classname",
+                    selected: "sat_courseware_classid",
+                    value: "",
+                    defaultVal: "",
+                    isAll: true,
+                    rang: [{ classname: "全部", sat_courseware_classid: "" }].concat(option.children),
+                };
+                i == -1 ? filtrateList.push(obj) : filtrateList[i] = obj;
+            } else {
+                i == -1 ? '' : filtrateList.pop();
+            }
+            this.$refs.Filtrate.list = filtrateList || JSON.parse(JSON.stringify());
+        },
+        onFiltration(e) {
+            let crumbs = [{
+                classname: "考试",
+                parentid: ""
+            }]
+            crumbs.push({
+                classname: e.一级分类.classname,
+                parentid: e.一级分类.sat_courseware_classid
+            })
+            if (e.二级分类) crumbs.push({
+                classname: e.二级分类.classname,
+                parentid: e.二级分类.sat_courseware_classid
+            })
+
+            this.crumbs = crumbs;
+            this.getList(true)
+        },
+        statusChange({ name }) {
+            this.content.where.status = name == '全部' ? '' : name;
+            this.getList(true)
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+.head {
+    padding: 10px;
+    width: 100%;
+    background: #fff;
+    box-sizing: border-box;
+
+    .filtrate {
+        line-height: 30px;
+        padding: 0 10px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #333333;
+        border-radius: 3px;
+        margin-left: 10px;
+
+        .iconfont {
+            margin-left: 3px;
+            color: #BBBBBB;
+        }
+    }
+}
+
+.crumbs {
+    display: flex;
+    line-height: 17px;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 12px;
+    flex-wrap: wrap;
+    width: 100%;
+    margin-top: 10px;
+
+    .crumb {
+        flex-shrink: 0;
+
+    }
+
+    .crumb::after {
+        content: ">";
+        padding: 0 2px;
+    }
+
+    .crumb:last-child {
+        font-weight: bold;
+    }
+
+    .crumb:last-child::after {
+        content: "";
+    }
+}
+
+.list-box {
+    width: 100vw;
+    padding: 10px;
+    padding-top: 0;
+    box-sizing: border-box;
+
+    .item {
+        position: relative;
+        background: #FFFFFF;
+        border-radius: 8px;
+        margin-top: 10px;
+        padding: 10px;
+        padding-top: 15px;
+
+        .title {
+            width: 280px;
+            line-height: 20px;
+            height: 40px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-weight: bold;
+            font-size: 14px;
+            color: #333333;
+        }
+
+        .hr {
+            width: 100%;
+            height: 1px;
+            background: #DDDDDD;
+            margin-top: 15px;
+        }
+
+        .status {
+            position: absolute;
+            top: 10px;
+            right: 0;
+            width: 44px;
+            height: 24px;
+            line-height: 24px;
+            border-radius: 12px 0px 0px 12px;
+            text-align: center;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 12px;
+            color: #FFFFFF;
+        }
+
+        .bottom {
+            display: flex;
+            justify-content: space-between;
+            line-height: 20px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 14px;
+            color: #666666;
+            margin-top: 10px;
+
+            .score {
+                color: #E3041F;
+                font-weight: bold;
+            }
+        }
+    }
+}
+</style>

+ 8 - 0
pages.json

@@ -20,6 +20,8 @@
 			"path": "exam/index"
 		}, {
 			"path": "exam/detail"
+		}, {
+			"path": "exam/result"
 		}, {
 			"path": "dailyYttendance/index"
 		}, {
@@ -104,6 +106,12 @@
 			"path": "commodityAdjustment/detail"
 		}, {
 			"path": "collect/mylist"
+		}, {
+			"path": "feedback/index"
+		}, {
+			"path": "feedback/detail"
+		}, {
+			"path": "feedback/insert"
 		}]
 	}, {
 		"root": "team",

+ 3 - 1
pages/index/index.vue

@@ -3,6 +3,7 @@
 		<index ref="首页" v-show="page == '首页'" />
 		<store ref="活动" v-show="page == '活动'" />
 		<my-case ref="案例" v-show="page == '案例'" />
+		<videos ref="视频" v-show="page == '视频'" />
 		<user-center ref="我的" v-show="page == '我的'" />
 
 		<workbench ref="工作台" v-show="page == '工作台'" />
@@ -19,6 +20,7 @@ import index from './index/index.vue'
 import store from './index/store.vue'
 import myCase from './index/myCase.vue'
 import userCenter from './index/userCenter.vue'
+import videos from './index/videos.vue'
 
 import dataBank from './cloud/dataBank.vue'
 import school from './cloud/school.vue'
@@ -27,7 +29,7 @@ import workbench from './cloud/workbench.vue'
 
 import bottomSuspensionFrame from "./modules/bottomSuspensionFrame.vue";
 export default {
-	components: { bottomSuspensionFrame, index, store, myCase, userCenter, dataBank, school, product, workbench },
+	components: { bottomSuspensionFrame, index, store, myCase, userCenter, dataBank, school, product, workbench, videos },
 	data() {
 		return {
 			swiperItemID: 'index',

+ 2 - 1
pages/index/index/index.vue

@@ -10,7 +10,7 @@
         </view>
 
         <slideshow ref="indexTop" />
-        <apps />
+        <apps ref="apps" />
 
         <view class="shop" v-if="shopDetail.storename">
             <view class="head">
@@ -119,6 +119,7 @@ export default {
     },
     methods: {
         init(callBack) {
+            this.$refs.apps.init();
             Promise.all([this.getLocaT(), this.$refs.indexTop.getBanners(['indexTop']), this.$refs.indexBottom.getBanners(['indexBottom'])]).then(res => {
                 callBack()
                 this.updatePage = false;

+ 9 - 64
pages/index/index/modules/apps.vue

@@ -1,12 +1,12 @@
 <template>
-    <view class="apps-box">
-        <view class="item" v-for="item in list" :key="item.label" hover-class="navigator-hover" @click="onClick(item)">
+    <view class="apps-box" v-if="list.length">
+        <view class="item" v-for="item in list" :key="item.remark" hover-class="navigator-hover" @click="switchPage(item)">
             <view class="label">
-                {{ item.label }}
+                {{ item.remark }}
                 <view class="backg" :style="{ background: item.color }" />
             </view>
             <view class="introduce u-line-2">
-                {{ item.introduce }}
+                {{ item.remarks }}
             </view>
         </view>
     </view>
@@ -17,40 +17,8 @@ export default {
     name: "apps",
     data() {
         return {
-            list: [{
-                label: "单品",
-                introduce: "电器 / 吊顶 / 墙面 / 木制品 \n渠道 / 工程",
-                itemId: "cloud"
-            }, {
-                label: "商品",
-                introduce: "总部直通车  千万大返利",
-                itemId: "index",
-                page: "活动",
-            }, {
-                label: "图库",
-                introduce: "电器 / 厨卫 / 阳台 / 背景墙 /顶墙",
-                itemId: "index",
-                page: "案例",
-                params: {
-                    active: '图库'
-                }
-            }, {
-                label: "实景/设计分享图",
-                introduce: "总部精选 / 实景图 / 设计图",
-                itemId: "index",
-                page: "案例",
-                params: {
-                    active: '实景案例'
-                }
-            }, {
-                label: "资料库",
-                introduce: "单品 / 通知 / 介绍 / 画册 / 物料\n视频 / 说明书等",
-                itemId: "cloud",
-            }, {
-                label: "商学院",
-                introduce: "产品 / 销售 / 管理 / 设计 / 考试等",
-                itemId: "cloud",
-            }, {
+            list: [],
+            list1: [{
                 label: "6C红人服务",
                 introduce: "装修报价 / 老房改造 / 精装房焕新\n品质服务",
                 path: "/packageA/advertising/unshareable?id=505"
@@ -58,15 +26,6 @@ export default {
                 label: "免费设计",
                 introduce: "0元领取全屋顶墙设计方案\n免费量尺寸 / 免费设计",
                 path: "/packageA/advertising/shareable?id=505"
-            }, {
-                label: "视频",
-                introduce: "品牌 / 产品 / 安装 / 服务等视频",
-                itemId: "index",
-            }, {
-                label: "云C+工作台",
-                introduce: "预约名单 / 人员管理 / 活动 \n门店 / 商城管理 / 排行榜等",
-                itemId: "cloud",
-                page: "工作台",
             }],
             colors: ['linear-gradient( 270deg, rgba(255,255,255,0) 0%, #E18FFA 100%)',
                 "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #FD8C90 100%)",
@@ -76,24 +35,10 @@ export default {
                 "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #D4D418 100%)"],
         }
     },
-    created() {
-        this.list = this.dye(this.list, this.colors, 2)
-    },
     methods: {
-        onClick(item) {
-            if (item.itemId) {
-                this.$Http.changePage(item.itemId, item.page || item.label, item.params || '')
-            } else if (item.path) {
-                uni.navigateTo({
-                    url: item.path,
-                })
-            } else {
-                uni.showToast({
-                    title: "功能尚在开发中",
-                    icon: "none"
-                })
-            }
-        }
+        init() {
+            this.list = this.dye(this.getApps('首页功能导航'), this.colors, 2)
+        },
     },
 }
 </script>

+ 54 - 0
pages/index/index/videos.vue

@@ -0,0 +1,54 @@
+<template>
+    <view>
+        视频
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            "content": {
+                "pageNumber": 1,
+                "pageSize": 20,
+                "where": {
+                    "condition": "",
+                    "isnew": '',
+                    "class": ""
+                }
+            }
+        }
+    },
+    methods: {
+        init(callBack) {
+            callBack()
+            this.updatePage = false;
+        },
+        getList(init = false) {
+            if (init) uni.pageScrollTo({
+                scrollTop: 0,
+                duration: 0,
+            })
+            return new Promise((resolve, reject) => {
+                if (this.paging(this.content, init)) return resolve();
+                this.$Http.basic({
+                    "id": "",
+                    content: this.content
+                }).then(res => {
+                    this.$refs.List.RefreshToComplete()
+                    console.log("获取商品列表", res)
+                    resolve();
+                    if (this.cutoff(res.msg)) return;
+                    res.data = this.$refs.commodity.handleList(res.data)
+                    this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                    this.content = this.$refs.List.paging(this.content, res)
+                    this.total = res.total;
+                    this.$refs.List.setHeight()
+                })
+            })
+        },
+    },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 2 - 0
utils/login.js

@@ -69,8 +69,10 @@ function parsingAuth(list) {
                     pathDetail: m.path_index,
                     name: m.name,
                     remark: m.meta.title,
+                    remarks: m.remarks,
                     cover: m.cover,
                     option: m.meta.auth.map(v => v.option),
+                    forms: m.meta.forms,
                     optionname: m.meta.auth.map(v => v.optionname)
                 }
             })

+ 43 - 2
utils/tool.js

@@ -34,6 +34,7 @@ function mount() {
         return new Promise((resolve, reject) => {
             let that = this;
             handle()
+
             function handle() {
                 uni.getLocation({
                     isHighAccuracy,
@@ -241,12 +242,52 @@ function mount() {
                 }
             })
         } else {
+            if (app.name == 'index_design') {
+                app.name = 'design';
+            } else if (['index_6C', 'index_freeDesign'].includes(app.name)) {
+                app.name = 'longText';
+            };
+            if (app.name == 'index_design') app.name = 'design';
             switch (app.name) {
                 case 'design':
-                    Vue.prototype.$Http.changePage("index","案例",{active: '实景案例' })
+                    Vue.prototype.$Http.changePage("index", "案例", {
+                        active: '实景案例'
+                    })
+                    break;
+                case 'index_product':
+                    Vue.prototype.$Http.changePage("cloud", "单品")
+                    break;
+                case 'index_commodity':
+                    Vue.prototype.$Http.changePage("index", "活动")
+                    break;
+                case 'index_imgs':
+                    Vue.prototype.$Http.changePage("index", "案例", {
+                        active: '图库'
+                    })
+                    break;
+                case 'index_dataBank':
+                    Vue.prototype.$Http.changePage("cloud", "资料库")
+                    break;
+                case 'index_school':
+                    Vue.prototype.$Http.changePage("cloud", "商学院")
+                    break;
+                case 'index_video':
+                    Vue.prototype.$Http.changePage("index", "视频")
+                    break;
+                case 'index_cloud':
+                    Vue.prototype.$Http.changePage("cloud", "工作台")
+                    break;
+                case 'longText':
+                    if (app.forms.path) {
+                        uni.navigateTo({
+                            url: app.forms.path.formcols[0].title
+                        })
+                    } else {
+                        console.log("长图文", app)
+                    }
                     break;
-            
                 default:
+                    console.log("未配置路径", app.name)
                     break;
             }
         }