kongdeqiang
2023-06-08 23cade0714cf5728fe46583415ed0dd744f98695
修改前端页面
4个文件已修改
2个文件已添加
220 ■■■■■ 已修改文件
public/words/administratorReturn.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/street/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/ticket/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/ticket/ticket-form2.vue 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/mutations.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/state.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/words/administratorReturn.docx
Binary files differ
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;
                })
            },
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)
            }
        })
      },
    }
src/components/page/ticket/ticket-form2.vue
New file
@@ -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>
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 @@
    }
  }
  }
src/store/state.js
@@ -101,5 +101,29 @@
            },
          ]
        },
      ],
 }
      ],
    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"
                },
            ]
        },
    ],
}