sunlupeng 2 rokov pred
rodič
commit
4013da0d87

+ 8 - 7
src/components/AppSidebar.vue

@@ -69,13 +69,7 @@ export default {
                 icon:'icon-mall-hongbao',
                 checked:false,
             },
-            {
-                value:'myCenter',
-                name:'个人中心',
-                path:'/home/myCenter',
-                icon:'icon-mall-gerenzhongxin',
-                checked:false,
-            },
+            
             {
                 value:'earnPoints',
                 name:'积分获取',
@@ -90,6 +84,13 @@ export default {
                 icon:'icon-mall-neibuzhengyiguanli',
                 checked:false,
             },
+            {
+                value:'myCenter',
+                name:'个人中心',
+                path:'/home/myCenter',
+                icon:'icon-mall-gerenzhongxin',
+                checked:false,
+            },
         ],
         employeeDynamics: false,
         pointsMall: false,

+ 17 - 4
src/views/HomeView/postInteract/detail.vue

@@ -15,7 +15,7 @@
                     <div class="quesList">
                         <div class="listItem" v-for="(item, index) in dataList" :key="index">
                             <div v-if="item.type == 'SCQ'">
-                                <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag size="small" type="danger"> 单选</el-tag></div>
+                                <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag class="elTag" size="small" type="danger">单选</el-tag></div>
                                 <el-radio-group v-model="item.comment" class="flex-column">
                                     <el-radio class="myRadio" :disabled="data.interactUserStatus == 0?false:true" v-for="(childItem, childIndex) in item.options" :key="childIndex"
                                         :label="childItem.id">{{ childItem.name }}</el-radio>
@@ -23,15 +23,15 @@
                             </div>
 
                             <div v-if="item.type == 'MCQ'">
-                                <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag size="small" type="danger"> 多选</el-tag></div>
+                                <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag class="elTag" size="small" type="danger">多选</el-tag></div>
                                 <el-checkbox-group v-model="item.comment" class="flex-column">
                                     <el-checkbox class="myRadio" :disabled="data.interactUserStatus == 0?false:true" v-for="(childItem, childIndex) in item.options" :key="childIndex"
                                         :label="childItem.id">{{ childItem.name }}</el-checkbox>
                                 </el-checkbox-group>
                             </div>
                             <div v-if="item.type == 'SAQ'">
-                                <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag size="small" type="danger"> 问答</el-tag></div>
-                                <el-input :disabled="data.interactUserStatus == 0?false:true" type="textarea" :rows="4" placeholder="请输入内容" v-model="item.comment"></el-input>
+                                <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag class="elTag" size="small" type="danger">问答</el-tag></div>
+                                <el-input type="textarea" :rows="6" maxlength="200" show-word-limit placeholder="请输入内容" v-model="item.comment"></el-input>
                             </div>
                         </div>
                         <div v-if="data.interactUserStatus == 0" class="footBut">
@@ -76,6 +76,12 @@ export default {
     methods: {
         save() {
             console.log(this.dataList);
+            for(var i=0;i<this.dataList.length;i++){
+                if(!this.dataList[i].comment){
+                    this.$message.error('还有题目未完成,无法提交!');
+                    return
+                }
+            }
             let dataList = [];
             this.dataList.forEach(item => {
                 if (item.type == "MCQ") {
@@ -134,6 +140,10 @@ export default {
 </script>
 <style scoped>
 .myRadio{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    white-space:normal !important;
     margin: 10px !important;
 }
 .flex-column{
@@ -160,6 +170,9 @@ export default {
     margin-bottom: 10px;
     font-weight: 700;
 }
+.elTag{
+    margin-left: 5px;
+}
 
 .userInfo {
     width: 65px;

+ 1 - 1
vue.config.js

@@ -14,7 +14,7 @@ const cdn = {
 };
 module.exports = defineConfig({
   devServer:{
-    host: '192.168.100.205',
+    host: '192.168.100.104',
     open:true
   },
   transpileDependencies: true,