浏览代码

spd问题提报修改

黄梓星 1 年之前
父节点
当前提交
b9b786c19d
共有 2 个文件被更改,包括 18 次插入4 次删除
  1. 15 1
      src/views/spdAddQuestion/add.vue
  2. 3 3
      src/views/spdAddQuestion/index.vue

+ 15 - 1
src/views/spdAddQuestion/add.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="spdAdd">
     <div style="padding:0 0 30px 10px;" v-if="!control">
-      <span>新增问题</span>
+      <!-- <span>新增问题</span> -->
       <el-form :model="basicForm" :rules="basicRules" ref="basic" label-position="left" label-width="auto">
         <el-row :gutter="10">
           <el-col :span="23">
@@ -137,6 +137,14 @@ export default {
       },
     }
   },
+  created() {
+    let phonenumber = this.GetQueryString('phonenumber')
+    let hosName = this.GetQueryString('hosName')
+    let officeName = this.GetQueryString('officeName')
+    if(phonenumber) { this.basicForm.contactInfo = phonenumber }
+    if(hosName) { this.basicForm.hospital = hosName }
+    if(officeName) { this.basicForm.department = officeName }
+  },
   methods: {
     successUpload(resp, file, fileList) {
       console.log(fileList)
@@ -205,6 +213,12 @@ export default {
         }
       });
     },
+    //获取url参数
+    GetQueryString(name) {
+      var  reg = new  RegExp( "(^|&)" + name + "=([^&]*)(&|$)()" );
+      var  r = window.location.search.substr(1).match(reg);
+      if (r!= null ) return   decodeURI(r[2]); return  null ;
+    }
   }
 }
 </script>

+ 3 - 3
src/views/spdAddQuestion/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div id="spdIndex">
     <div style="padding:0 0 30px 10px;">
-      <span>新增问题</span>
-      <div style="text-align: center;">
-        <el-button style="width: 150px;" type="primary" size="mini" @click="add()">新 增</el-button>
+      <!-- <span>新增问题</span> -->
+      <div style="text-align: center;margin-top:20px;">
+        <el-button style="width: 150px;" type="primary" size="mini" @click="add()">新增问题</el-button>
       </div>
     </div>
   </div>