Quellcode durchsuchen

Merge branch 'master' into referMaster

luolei vor 5 Jahren
Ursprung
Commit
fe6931df1f
6 geänderte Dateien mit 18 neuen und 26 gelöschten Zeilen
  1. 1 0
      config/index.js
  2. 5 11
      package-lock.json
  3. 1 1
      src/common/Dialog.vue
  4. 3 3
      src/components/AddContent.vue
  5. 7 11
      src/components/MainPage.vue
  6. 1 0
      src/store.js

+ 1 - 0
config/index.js

@@ -24,6 +24,7 @@ module.exports = {
 
     // Various Dev Server settings
     port: 8083, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+    // host: '192.168.0.101',
     host: '192.168.3.106',
     autoOpenBrowser: true,
     errorOverlay: true,

+ 5 - 11
package-lock.json

@@ -306,8 +306,7 @@
     "assert-plus": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
-      "optional": true
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
     },
     "assign-symbols": {
       "version": "1.0.0",
@@ -2107,7 +2106,6 @@
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
       "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "optional": true,
       "requires": {
         "delayed-stream": "~1.0.0"
       }
@@ -3433,8 +3431,7 @@
     "delayed-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
-      "optional": true
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
     },
     "depd": {
       "version": "1.1.2",
@@ -4172,8 +4169,7 @@
     "extsprintf": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
-      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
-      "optional": true
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
     },
     "fast-deep-equal": {
       "version": "2.0.1",
@@ -5891,8 +5887,7 @@
     "jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
-      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
-      "optional": true
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
     },
     "json-loader": {
       "version": "0.5.7",
@@ -11051,8 +11046,7 @@
     "tweetnacl": {
       "version": "0.14.5",
       "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
-      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
-      "optional": true
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
     },
     "type": {
       "version": "1.0.1",

+ 1 - 1
src/common/Dialog.vue

@@ -38,7 +38,7 @@ export default {
       const {cancelNum,idx,num,extNum}=this;
       let realExt=getNSum(extNum);
       const realIdx = realExt+idx;
-      //console.log("cancelNum:",cancelNum,"idx:",idx,"num:",num,"extNum:",extNum,"realIdx:",realIdx);
+      // console.log("cancelNum:",cancelNum,"idx:",idx,"num:",num,"extNum:",extNum,"realIdx:",realIdx);
       //if((realCNum<realIdx&&realIdx===realNum-1)||(num===0&&isLast&&cancelNum!==idx)){
       if(realIdx===num-1&&cancelNum<realIdx){
         //console.log(true)

+ 3 - 3
src/components/AddContent.vue

@@ -122,11 +122,11 @@ export default {
     },
     next(flg){
       let routeName = getRouteName(flg)
-      this.$router.push({
-        path:routeName
-      })
       this.$store.commit('setText',{data:this.dataTrd,type:this.allMoudles&&this.allMoudles.type});
       this.$emit('next','preview')
+      this.$router.replace({
+        path:routeName
+      })
     },
     setDetail(obj){
       this.labelDetail = obj.detail;

+ 7 - 11
src/components/MainPage.vue

@@ -60,15 +60,6 @@
           <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length,diagnoseQasList.length,othersQasList.length]" :cancelNum="cancelNum"/>
         </div> -->
         
-        <!-- <div v-for="(item,idx) in diagnoseQasList" :key="'1'+idx+item.id" v-if="activeTab==51">
-          <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length]" :cancelNum="cancelNum"/>
-        </div>
-        <div v-for="(item,idx) in othersQasList" :key="'2'+idx+item.id" v-if="activeTab==3">
-          <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length,diagnoseQasList.length]" :cancelNum="cancelNum"/>
-        </div>
-        <div v-for="(item,idx) in addContentQasList" :key="'3'+idx+item.id" v-if="activeTab==52">
-          <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length,diagnoseQasList.length,othersQasList.length]" :cancelNum="cancelNum"/>
-        </div> -->
       </div>
     </div>
     <MultSelect @updataResult="updataResultSingle" :num="num" :symptomResult="symptomResult" v-if="type==3"></MultSelect>
@@ -244,7 +235,7 @@ export default {
       return {arr,arrp};
     },
     previewRes(){
-      this.$router.push({
+      this.$router.replace({
         path:'/preview'
       })
     },
@@ -361,7 +352,9 @@ export default {
       this[moduleName] = tmpArr;
       //上传的图片及是否有可上传***答案不显示在预览所以不记录到state.diagnose.text中
       if(this.symptomResult.id!==999999&&this.symptomResult.controlType!=4){
-        this.$store.commit('setText', { type: this.activeTab,
+        // console.log('当前问题单选',this.num-1,this.canceledQa,contentResult.val,contentResult.valp)
+        this.$store.commit('setText', { 
+          type: this.activeTab,
           text: contentResult.val,
           textP: contentResult.valp,
           idx:contentResult.idx,
@@ -392,6 +385,7 @@ export default {
           //console.log(tmpNowItem)
           this.symptomResult = tmpNowItem;
         });
+        this.canceledQa = -1//进入下一阶段需要初始化
         this.$nextTick(()=>{
           this.scroll.refresh()
           this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
@@ -413,6 +407,8 @@ export default {
         this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
       })
     },
+
+
     showWarn(text){
       this.waring=text;
       this.wrong=true;

+ 1 - 0
src/store.js

@@ -298,6 +298,7 @@ const store = new Vuex.Store({
     },
     setText(state,param){
       const type = parseInt(param.type);
+      // console.log(param,787)
       switch(type){
         case moduleCP['symp']:
           // 对象易更新但顺序无法控制