From 23cade0714cf5728fe46583415ed0dd744f98695 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期四, 08 六月 2023 16:52:35 +0800
Subject: [PATCH] 修改前端页面

---
 src/components/page/ticket/index.vue        |   23 +++++
 src/components/page/street/index.vue        |    4 
 src/store/mutations.js                      |   12 +-
 src/store/state.js                          |   28 ++++++
 src/components/page/ticket/ticket-form2.vue |  153 ++++++++++++++++++++++++++++++++++++++
 public/words/administratorReturn.docx       |    0 
 6 files changed, 209 insertions(+), 11 deletions(-)

diff --git a/public/words/administratorReturn.docx b/public/words/administratorReturn.docx
new file mode 100644
index 0000000..7b24573
--- /dev/null
+++ b/public/words/administratorReturn.docx
Binary files differ
diff --git a/src/components/page/street/index.vue b/src/components/page/street/index.vue
index 2ebc0d9..b32f60a 100644
--- a/src/components/page/street/index.vue
+++ b/src/components/page/street/index.vue
@@ -151,14 +151,14 @@
                 this.loadSelect();
             },
             loadSelect(){
-                this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/street/findList', {}, res => {
+                this.$byutil.getData(this, this.$systemconfig.basePath + '/ffzf/street/findList', {}, res => {
                     this.select3 = res.data.list2
                 })
             },
             streetEdit(id){
                 this.flag2 = true;
                 this.roadId = id;
-                this.$byutil.postData(this, this.$systemconfig.basePath + '/ffzf/street/findById', {id:id,type:0}, res => {
+                this.$byutil.getData(this, this.$systemconfig.basePath + '/ffzf/street/findById', {id:id,type:0}, res => {
                     this.table2 = res.data;
                 })
             },
diff --git a/src/components/page/ticket/index.vue b/src/components/page/ticket/index.vue
index 648b450..e271490 100644
--- a/src/components/page/ticket/index.vue
+++ b/src/components/page/ticket/index.vue
@@ -126,6 +126,7 @@
                   label="鎿嶄綔">
             <template slot-scope="scope">
               <el-button  type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle(scope.row.id)">澶勫喅涔�</el-button>
+              <el-button  type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle2(scope.row)">閫佽揪鍥炶瘉</el-button>
               <el-button  type="text" size="small" icon="el-icon-view" @click="pictureHandle(scope.row)">鍥惧儚璇佹嵁</el-button>
               <el-button  type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">鐜板満缂磋垂</el-button>
             </template>
@@ -137,6 +138,7 @@
 
       <!-- 寮圭獥, 鏂板 / 淇敼 -->
       <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></table-form>
+      <table-form2 v-if="addOrUpdateVisible2" ref="addOrUpdate2" @refreshDataList="getDataList"></table-form2>
       <!--鍥惧儚璇佹嵁-->
       <pictureForm v-if="pictureFormVisiable" ref="pictureForm"></pictureForm>
   </div>
@@ -144,6 +146,7 @@
 
 <script>
   import TableForm from './ticket-form'
+  import TableForm2 from './ticket-form2'
   import pictureForm from './picture-form'
   export default {
     data () {
@@ -168,11 +171,13 @@
         totalPage: 0,
         dataListLoading: false,
         addOrUpdateVisible: false,
+        addOrUpdateVisible2: false,
         pictureFormVisiable:false, //鍥惧儚璇佹嵁寮规
       }
     },
     components: {
       TableForm,
+      TableForm2,
       pictureForm
     },
     created () {
@@ -225,10 +230,26 @@
           this.$refs.addOrUpdate.init(id)
         })
       },
+      // 鏂板 / 淇敼
+      addOrUpdateHandle2 (row) {
+        if(row.personName != null){
+          this.addOrUpdateVisible2 = true
+          this.$nextTick(() => {
+            this.$refs.addOrUpdate2.init(id)
+          })
+        }else {
+          this.$message.error("澶勫喅涔﹁繕鏈~鍐欙紒")
+        }
+
+      },
       //鐜板満缂磋垂
       jiaofeiHandle(id){
         this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/ticket/jiaofei', {id:id}, res => {
-          this.getDataList()
+            if(res.code===0){
+              this.$message.success(res.msg)
+            }else {
+              this.$message.error(res.msg)
+            }
         })
       },
     }
diff --git a/src/components/page/ticket/ticket-form2.vue b/src/components/page/ticket/ticket-form2.vue
new file mode 100644
index 0000000..3529fb2
--- /dev/null
+++ b/src/components/page/ticket/ticket-form2.vue
@@ -0,0 +1,153 @@
+<template>
+  <div>
+    <el-dialog
+      :title="!dataForm.id ? '鏂板' : '瀹屽杽淇℃伅'"
+      append-to-body
+      :close-on-click-modal="false"
+      :visible.sync="visible"
+      v-dialogDrag>
+      <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
+               label-width="140px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="骞翠唤">
+              <el-date-picker
+                style="width: 100%"
+                v-model="dataForm.year"
+                value-format="yyyy"
+                type="year"
+                placeholder="閫夋嫨骞�">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏂囦功鍙�">
+              <el-input v-model="dataForm.number"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="褰撲簨浜�" prop="personName">
+              <el-input v-model="dataForm.personName" placeholder="璇疯緭鍏ュ綋浜嬩汉"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="韬唤璇佸彿鐮�" prop="idCard">
+              <el-input v-model="dataForm.idCard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙风爜"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+      <el-button @click="visible = false">鍙栨秷</el-button>
+      <el-button type="primary" @click="viewVord(dataForm)">棰勮</el-button>
+      <el-button type="success" @click="downloadWord(dataForm)">涓嬭浇</el-button>
+    </span>
+    </el-dialog>
+    <WordView v-if="WordViewShow" ref="WordView"></WordView>
+  </div>
+</template>
+
+<script>
+  import WordView from './word-view/index'
+  import {exportDoc} from '../../../libs/word'
+
+  export default {
+    components: {
+        WordView
+    },
+    data() {
+      return {
+        WordViewShow: false,   //word鏂囨。鏄惁鏄剧ず
+        visible: false,
+        loadingSubmit:false,
+        dataForm: {
+            year:'',
+            number:'',
+            personName:'',
+            idCard: '',
+            chufaCheckList:[],
+            fakuanCheckList:[],
+            personAddress:'',
+            zfName1:'',
+            zfName2:'',
+            zfNum1:'',
+            zfNum2:'',
+            id:'',
+            days: '0'
+
+        },
+        dataRule: {
+
+          personName: [
+                {required: true, message: '褰撲簨浜轰笉鑳戒负绌�', trigger: 'blur'}
+              ],
+          personAddress: [
+            {required: true, message: '褰撲簨浜哄湴鍧�涓嶈兘涓虹┖', trigger: 'blur'}
+          ],
+          idCard: [
+                {required: true, message: '韬唤璇佸彿涓嶈兘涓虹┖', trigger: 'blur'}
+              ],
+          zfName1: [
+                {required: true, message: '鎵ф硶浜哄憳1涓嶈兘涓虹┖', trigger: 'blur'}
+              ],
+          zfName2: [
+                {required: true, message: '鎵ф硶浜哄憳2涓嶈兘涓虹┖', trigger: 'blur'}
+              ],
+        }
+      }
+    },
+    methods: {
+      init(id) {
+        this.dataForm.id = id || null;
+        this.visible = true;
+        this.$nextTick(() => {
+          this.$refs['dataForm'].resetFields()
+          if (this.dataForm.id) {
+            this.$byutil.getData(this,this.$systemconfig.basePath+'/ffzf/ticket/'+id,null,res=>{
+              this.dataForm = res.data
+            })
+          }
+        })
+      },
+      viewVord(data) {  //word棰勮
+          this.WordViewShow = true
+          this.$nextTick(() => {
+              this.$refs.WordView.initWord(data,'/words/administratorReturn.docx')
+          })
+      },
+      downloadWord(data) {  //word涓嬭浇
+
+          exportDoc(data,'/words/administratorReturn.docx','閫佽揪鍥炶瘉琛屾斂澶勭綒鍐冲畾涔�')
+      },
+    }
+  }
+</script>
+<style lang="scss">
+  .el-checkbox.flexDate{
+    display: flex;
+    align-items: baseline;
+    .el-checkbox__label{
+      display: flex;
+      flex-wrap: wrap;
+      line-height: 2;
+      white-space: initial;
+    }
+  }
+</style>
+<style lang="scss" scoped>
+  .flexDate{
+    display: flex;
+    span{
+      margin-left: 5px;
+    }
+  }
+  .dialog-footer{
+    display: flex;
+    justify-content: center;
+    .el-button{
+      margin: 0 5px;
+    }
+  }
+</style>
diff --git a/src/store/mutations.js b/src/store/mutations.js
index a5c6d1b..e8fc14e 100644
--- a/src/store/mutations.js
+++ b/src/store/mutations.js
@@ -9,17 +9,17 @@
     },
     SET_ROLELISt:(state,payload)=>{
         console.log('瑙﹀彂')
-        //澶勭悊宸︿晶鑿滃崟鏍忛�昏緫   
+        //澶勭悊宸︿晶鑿滃崟鏍忛�昏緫
             // type 2 : all admin
             // type 0 :  娉婅溅 id:2
-            // type 1 :  鎵ф硶 id:3 
+            // type 1 :  鎵ф硶 id:3
             // state.roles  // 鐢ㄦ埛鏉冮檺瀛楁
             // state.resultAsyncRoutes // 鐢ㄦ埛鏉冮檺璺敱
             switch (state.roles) {
                 case 0:
-                    state.resultAsyncRoutes = state.items.filter((item)=>item.id == 2);
+                    state.resultAsyncRoutes = state.items2.filter((item)=>item.id == 2);
                     localStorage.setItem('userRouters',JSON.stringify(state.resultAsyncRoutes));
-                    console.log(state.resultAsyncRoutes,state.roles,'0娉婅溅') 
+                    console.log(state.resultAsyncRoutes,state.roles,'0娉婅溅')
                     break;
                 case 1:
                     state.resultAsyncRoutes =state.items.filter((item)=>item.id == 3);
@@ -31,7 +31,7 @@
                     localStorage.setItem('userRouters',JSON.stringify(state.resultAsyncRoutes));
                       console.log(state.resultAsyncRoutes,state.roles,' 鍏ㄩ儴')//  涓嶇敤淇敼
                   break;
-                
+
                 default:
                     break;
             }
@@ -43,4 +43,4 @@
 
     }
 
-  }
\ No newline at end of file
+  }
diff --git a/src/store/state.js b/src/store/state.js
index 3cda72c..17ea89c 100644
--- a/src/store/state.js
+++ b/src/store/state.js
@@ -101,5 +101,29 @@
             },
           ]
         },
-      ], 
- }
\ No newline at end of file
+      ],
+    items2: [
+        {
+            id:2,
+            icon: 'el-icon-folder-opened',
+            indexUrl: '2',
+            name: '鏅烘収娉婅溅绠$悊',
+            children:[
+                {
+                    icon: 'el-icon-document',
+                    name: '杞﹁締鍏ュ満绠$悊',
+                    parentId: 2,
+                    indexUrl: "enterPark"
+                },
+                {
+                    icon: 'el-icon-document',
+                    name: '杞﹁締鍑哄満绠$悊',
+                    parentId: 2,
+                    indexUrl: "outPark"
+                },
+
+            ]
+        },
+
+    ],
+}

--
Gitblit v1.9.1