wl
2022-10-27 d8964407547bdc5078cfec99e95b34e0054e0088
处理bug
10个文件已修改
289 ■■■■■ 已修改文件
src/components/detail/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/filePictrue/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/illdetail/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/helper.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/fivepack/shop/components/createUser/index.vue 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/fivepack/shop/components/updateUser/index.vue 162 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/log/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/department/createUser/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/department/updateUser/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/user/components/createUser/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/detail/index.vue
@@ -5,7 +5,7 @@
                <div class="data-item__left">
                    <label class="data-title">
                        问题类型:
                    </label>
                    </label>
                    <span class="data-detail">违规</span>
                </div>
                <div class="data-item__right">
src/components/filePictrue/index.vue
@@ -7,7 +7,7 @@
                    <div class="my-demo" v-for="childer in item.url">
                        <img class="img" :src="childer" alt="">
                        <div class="tip">
                            <!-- <div>【图片类型】上报</div> -->
                            <div>【图片类型】上报</div>
                            <div>【上传时间】{{ changeTime(item.createTime) }}</div>
                        </div>
                    </div>
@@ -17,7 +17,7 @@
        <div class="file-deal">
            <div class="tell-title">处置</div>
            <div class="tell-show" v-for="item in imgSource" :key="item.id">
                <div v-if="item.type == '02'" style="display:flex">
                <div v-if="item.type == '02'" class="tell-demo">
                    <div class="my-demo" v-for="childer in item.url">
                        <img class="img" :src="childer" alt="">
                        <div class="tip">
@@ -92,7 +92,11 @@
        }
        .tell-show {
            display: flex;
            .tell-demo {
                display: flex;
                flex-wrap: wrap;
                width: 100%;
            }
        }
    }
src/components/illdetail/index.vue
@@ -130,6 +130,7 @@
          <MyFilePicture
            v-else-if="activeIndex === 2"
            :filesPictureVo="filesPictureVo"
            :mycode='mycode'
          ></MyFilePicture>
          <MySovleProblem
            v-else-if="activeIndex === 3"
@@ -197,10 +198,10 @@
  },
  methods: {
    changeComponent(index) {
      this.activeIndex = index;
      this.activeIndex = index;
    },
  },
  props: ["info"],
  props: ["info","mycode"],
};
</script>
<style lang="scss" scoped>
src/utils/helper.js
@@ -78,6 +78,17 @@
    }
    return;
}
// 获取年月日时分秒
export function getNowDate(time){
    const result = new Date(time);
    let yy = result.getFullYear(),
    mm = result.getMonth()+1,
    dd = result.getDate(),
    hh = result.getHours(),
    mi = result.getMinutes(),
    ss = result.getSeconds()
    return yy+'-'+ fillTime(mm)+'-'+fillTime(dd)+" "+fillTime(hh)+':'+fillTime(mi) + ':' + fillTime(ss);
}
function filterTime(time) {
    if (time < 0) {
        return '已逾期';
src/views/operate/fivepack/shop/components/createUser/index.vue
@@ -5,8 +5,8 @@
                <el-form ref="user" label-width="140px" autoComplete="on" :model="store" :rules="createUserRules"
                    label-position="right">
                    <!-- 店铺类型 -->
                    <el-form-item class="optionItem" label="店铺类型:" prop="storetype">
                        <el-select v-model="store.storetype" placeholder="请选择店铺类型">
                    <el-form-item class="optionItem" label="店铺类型:" prop="type">
                        <el-select v-model="store.type" placeholder="请选择店铺类型">
                            <el-option value="1">
                                <el-tree ref="tree" :check-strictly="true" :data="shopTypeList" :props="defaultProps"
                                    show-checkbox @check-change="handleCheck" default-expand-all node-key="id">
@@ -23,9 +23,9 @@
                        <el-input v-model="store.owner" placeholder="请填写店铺负责人名字"></el-input>
                    </el-form-item>
                    <!-- 店铺描述 -->
                    <el-form-item class="optionItem" label="店铺描述:" prop="storedesc">
                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="300" show-word-limit
                            v-model="store.storedesc" placeholder="输入店铺描述"></el-input>
                    <el-form-item class="optionItem" label="店铺描述:" prop="description">
                        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8 }" maxlength="300" show-word-limit
                            v-model="store.description" placeholder="输入店铺描述"></el-input>
                        <!-- <el-input type="textarea" v-model="user.storedesc" placeholder="输入部门描述"></el-input> -->
                    </el-form-item>
                    <!-- 联系方式 -->
@@ -58,9 +58,9 @@
                callback();
            }
        };
        const validatePass = (rule, value, callback) => {
        const validateShopName = (rule, value, callback) => {
            if (!value) {
                callback();
                callback(new Error('店铺名称不能为空'));
            } else {
                callback();
            }
@@ -84,14 +84,15 @@
                }
            }
        };
        const validateMail = (rule, value, callback) => {
            if (value) {
                callback();
            } else {
                callback(new Error('店铺名称不能为空'))
            }
        };
        // const validateMail = (rule, value, callback) => {
        //     if (value) {
        //         callback();
        //     } else {
        //         callback(new Error('店铺名称不能为空'))
        //     }
        // };
        const validateType = (rule, value, callback) => {
            console.log(value)
            if (!value) {
                callback(new Error('门店类型不能为空'));
            } else {
@@ -113,38 +114,38 @@
                storeaddr: '',
                storename: '',
                storedesc: '',
                storetype: '',
                type: '',
            },
            createUserRules: {
                owner: [
                    { required: true, trigger: "blur", validator: validateNickname },
                ],
                storetype: [
                type: [
                    {
                        required: true, trigger: 'change', validator: validateType,
                    }
                ],
                idcardinfo: [
                    { required: true, trigger: "blur", validator: validatePass },
                ],
                // idcardinfo: [
                //     { required: true, trigger: "blur", validator: validatePass },
                // ],
                storeaddr: [
                    { required: true, trigger: "blur", validator: validateTruename },
                ],
                contact: [
                    { required: true, trigger: "blur", validator: validatePhone },
                ],
                storename: [
                    { required: true, trigger: "blur", validator: validateMail },
                ],
                storedesc: [
                description: [
                    { required: false, trigger: "blur", validator: validateDesc },
                ],
                storename: [
                    { required: true, trigger: "blur", validator: validateShopName },
                ]
            },
            shopTypeList: [
                { name: '类型1', value: 1 }, { name: '类型2', value: 2 }
            ],
            defaultProps: {
                children: 'children',
                children: 'children',
                label: 'name',
                disabled: (data, node) => {
                    if (node.level === 1 && node.childNodes.length !== 0) {
@@ -162,7 +163,7 @@
    },
    methods: {
        handleStore() {
            const { store } = this;
            const { store,selectOrg } = this;
            this.$refs.user.validate((valid) => {
                console.log(valid);
                if (valid) {
@@ -171,10 +172,11 @@
                        url: 'sccg/store/storeinfo/add',
                        data: {
                            contact: store.contact,
                            idcardinfo: '511025184612310215',
                            owner: store.owner,
                            storeaddr: store.storeaddr,
                            storename: store.storename,
                            description: store.description,
                            type: selectOrg.orgsid[0],
                        }
                    })
                        .then(res => {
@@ -226,7 +228,8 @@
            }
        },
        handleCheck(data, checked) {
            this.store.storetype = data.name;
            console.log(data)
            this.store.type = data.name;
            // 获取当前选择的id在数组中的索引
            const indexs = this.selectOrg.orgsid.indexOf(data.id)
            // 如果不存在数组中,并且数组中已经有一个id并且checked为true的时候,代表不能再次选择。
src/views/operate/fivepack/shop/components/updateUser/index.vue
@@ -1,13 +1,16 @@
<template>
    <div class="createUser">
    <div class="createUser" v-if="showFlag">
        <main>
            <div class="mainContent">
                <el-form ref="user" label-width="140px" autoComplete="on" :model="store" :rules="createUserRules"
                    label-position="right">
                    <!-- 店铺类型 -->
                    <el-form-item class="optionItem" label="店铺类型:" prop="storetype">
                        <el-select v-model="store.storetype" placeholder="店铺/门店类型">
                            <el-option v-for="item in shopTypeList" :key="item.name" :label="item.name" :value="item.value">
                    <el-form-item class="optionItem" label="店铺类型:" prop="type">
                        <el-select v-model="store.type" placeholder="请选择店铺类型">
                            <el-option value="1">
                                <el-tree ref="tree" :check-strictly="true" :data="shopTypeList" :props="defaultProps"
                                    show-checkbox @check-change="handleCheck" :default-checked-keys="[selectOrg.orgsid[0]]" default-expand-all node-key="id">
                                </el-tree>
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -21,7 +24,7 @@
                    </el-form-item>
                    <!-- 店铺描述 -->
                    <el-form-item class="optionItem" label="店铺描述:" prop="storeDesc">
                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" maxlength="300" show-word-limit
                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="300" show-word-limit
                            v-model="store.storeDesc" placeholder="输入店铺描述"></el-input>
                        <!-- <el-input type="textarea" v-model="user.storedesc" placeholder="输入部门描述"></el-input> -->
                    </el-form-item>
@@ -45,6 +48,7 @@
    </div>
</template>
<script>
import { getCodeList } from '@/utils/helper'
export default {
    data() {
        const validateNickname = (rule, value, callback) => {
@@ -75,7 +79,7 @@
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }else{
                } else {
                    callback();
                }
            }
@@ -90,7 +94,7 @@
        const validateType = (rule, value, callback) => {
            if (!value) {
                callback(new Error('门店类型不能为空'));
            } else {
            } else {
                callback();
            }
        };
@@ -108,9 +112,9 @@
                owner: [
                    { required: true, trigger: "blur", validator: validateNickname },
                ],
                storetype:[
                storetype: [
                    {
                        required:true,trigger:'change', validator:validateType,
                        required: true, trigger: 'change', validator: validateType,
                    }
                ],
                idcardinfo: [
@@ -130,60 +134,130 @@
                ],
            },
            shopTypeList: [
                { name: '类型1', value: 1 }, { name: '类型2', value: 2 }
            ],
            defaultProps: {
                children: 'children',
                label: 'name',
            },
            selectOrg: {
                orgsid: []
            },
            showFlag:false
        }
    },
    created() {
        const {userInfo} = this;
        console.log(userInfo)
        const { userInfo } = this;
        // console.log(userInfo)
        this.store = userInfo
        this.getShopTypeList();
        // console.log(this.store)
    },
    methods: {
        // 获取字典
        async getShopTypeList() {
            let arr = await getCodeList('16');
            this.selectOrg.orgsid[0] = this.store.type
            console.log(this.selectOrg.orgsid)
            arr.forEach(item=>{
                item.id === this.store.type ? this.store.type = item.name : '暂无分类'
            })
            this.showFlag = true
            this.shopTypeList = this.createShopTypeTree(arr);
        },
        createShopTypeTree(arr) {
            if (arr.length && arr.length !== 0) {
                // 获取顶级菜单
                let treeRoot = arr.filter(item => {
                    return item.parentId === 0
                })
                console.log(treeRoot);
                // 添加child
                treeRoot.forEach(item => {
                    item.children = []
                    arr.forEach(child => {
                        if (child.parentId === item.id) {
                            item.children.push(child)
                        }
                    })
                })
                return treeRoot;
            }
        },
        handleCheck(data, checked) {
            // console.log(data)
            this.store.type = data.name;
            // 获取当前选择的id在数组中的索引
            const indexs = this.selectOrg.orgsid.indexOf(data.id)
            // 如果不存在数组中,并且数组中已经有一个id并且checked为true的时候,代表不能再次选择。
            if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
                this.$message({
                    message: '只能选择一个部门!',
                    type: 'warning',
                    showClose: true
                })
                // 设置已选择的节点为false 很重要
                this.$refs.tree.setChecked(data, false)
            } else if (this.selectOrg.orgsid.length === 0 && checked) {
                // 发现数组为空 并且是已选择
                // 防止数组有值,首先清空,再push
                this.selectOrg.orgsid = []
                this.selectOrg.orgsid.push(data.id)
            } else if (
                indexs >= 0 &&
                this.selectOrg.orgsid.length === 1 &&
                !checked
            ) {
                // 再次直接进行赋值为空操作
                this.selectOrg.orgsid = []
                this.store.storetype = ''
            }
        },
        handleUser() {
            const { store } = this;
            this.$refs.user.validate((valid)=>{
            this.$refs.user.validate((valid) => {
                console.log(valid);
                if(valid){
                if (valid) {
                    this.$axios({
                        method:'put',
                        url:'sccg/store/storeinfo/update',
                        data:{
                            contact:store.contact,
                            idcardinfo:store.idCardInfo,
                            owner:store.owner,
                            storeAddress:store.storeAddress,
                            storeName:store.storeName,
                            id:store.id,
                            storePhoto:store.storePhoto,
                            storeScore:store.storeScore,
                        method: 'put',
                        url: 'sccg/store/storeinfo/update',
                        data: {
                            contact: store.contact,
                            idcardinfo: store.idCardInfo,
                            owner: store.owner,
                            storeAddress: store.storeAddress,
                            storeName: store.storeName,
                            id: store.id,
                            storePhoto: store.storePhoto,
                            storeScore: store.storeScore,
                            type:this.selectOrg.orgsid[0]
                        }
                    })
                    .then(res=>{
                        console.log(res);
                        if(res.code===200){
                            this.$message({
                                type:'success',
                                message:'修改成功',
                            })
                            this.$emit('changeDialog',{flag:false});
                        }else{
                            this.$message({
                                type:'error',
                                message:res.message,
                            })
                        }
                    })
                }else{
                        .then(res => {
                            console.log(res);
                            if (res.code === 200) {
                                this.$message({
                                    type: 'success',
                                    message: '修改成功',
                                })
                                this.$emit('changeDialog', { flag: false });
                            } else {
                                this.$message({
                                    type: 'error',
                                    message: res.message,
                                })
                            }
                        })
                } else {
                    return false;
                }
            })
        },
        handleBack(){
            this.$emit('changeDialog',{flag:false})
        handleBack() {
            this.$emit('changeDialog', { flag: false })
        }
    },
    props: ['userInfo','changeDialog']
    props: ['userInfo', 'changeDialog']
}
</script>
<style lang="scss" scoped>
src/views/operate/log/index.vue
@@ -80,9 +80,10 @@
          <el-table-column type="selection" min-width="5"> </el-table-column>
          <el-table-column
            prop="createTime"
            sortable
            label="日志时间"
            min-width="10"
            :sort-orders="['descending','ascending']"
            sortable="custom"
          >
            <template slot-scope="scope">
              <span>{{ changeTime(scope.row.createTime) }}</span>
@@ -147,6 +148,7 @@
  </div>
</template>
<script>
import {getNowDate} from '@/utils/helper'
import helper from "@/utils/mydate";
import { parseTime } from "@/utils/index";
import { createNamespacedHelpers } from "vuex";
@@ -170,7 +172,7 @@
          label: "批量删除",
        },
      ],
      mysort: 0,
      mysort: 1,
      tempList: [],
      operationType: "全部",
      operationTypeList: [],
@@ -198,17 +200,21 @@
    },
    // 导出日志
    async handleExport() {
      const { currentPage, pageSize, context, operationType } = this;
      const { currentPage, pageSize, context, operationType, mysort, mytime } =
        this;
      console.log(mytime);
      let arr = await this.exportLogs({
        content: context,
        current: currentPage,
        endTime: mytime[1] !== "" ? parseTime(mytime[1]) : "",
        id: "",
        operationType: operationType === "全部" ? "" : operationType,
        portEquipment: "",
        size: pageSize,
        startTime: mytime[0] !== "" ? parseTime(mytime[0]) : "",
        sort: mysort,
      });
      let fileName = arr.headers["content-disposition"];
      console.log(fileName);
      if (fileName) {
        fileName = fileName.slice(fileName.indexOf("filename=") + 9);
      }
      let fileName = getNowDate(new Date());
      const blob = new Blob([arr.data], {
        type: "application/octet-stream",
      });
@@ -218,7 +224,7 @@
      const href = window.URL.createObjectURL(blob);
      downloadElement.href = href;
      // // 下载后文件名
      downloadElement.download = fileName;
      downloadElement.download = fileName + '日志数据.xlsx';
      document.body.appendChild(downloadElement);
      // 点击下载
      downloadElement.click();
@@ -226,6 +232,7 @@
      document.body.removeChild(downloadElement);
      // 释放掉blob对象
      window.URL.revokeObjectURL(href);
      this.setTableData();
    },
    // 设置操作类型
    async setOperationType() {
src/views/systemSetting/baseSetting/department/createUser/index.vue
@@ -402,7 +402,8 @@
        right: 0;
        .box-card {
          max-height: 200px;
          min-height: 240px;
          max-height: 260px;
          overflow: hidden;
          background-color: #09152f;
          position: relative;
@@ -410,7 +411,7 @@
          .scrollWrap {
            overflow: scroll;
            height: 160px;
            height: 180px;
            position: relative;
            color: #4b9bb7;
@@ -437,7 +438,7 @@
            top: 77px;
            right: 20px;
            width: 20px;
            height: 160px;
            height: 180px;
            background-color: #09152f;
          }
src/views/systemSetting/baseSetting/department/updateUser/index.vue
@@ -323,7 +323,8 @@
  right: 0;
  .box-card {
    max-height: 200px;
    min-height: 240px;
    max-height: 260px;
    overflow: hidden;
    background-color: #09152f;
    position: relative;
@@ -331,7 +332,7 @@
    .scrollWrap {
      overflow: scroll;
      height: 160px;
      height: 180px;
      position: relative;
      color: #4b9bb7;
@@ -358,7 +359,7 @@
      top: 77px;
      right: 20px;
      width: 20px;
      height: 160px;
      height: 180px;
      background-color: #09152f;
    }
src/views/systemSetting/baseSetting/user/components/createUser/index.vue
@@ -385,9 +385,10 @@
                        // nickName: user.nickName,
                        sex: `${user.sex}`,
                        password: user.password,
                        userType: `${user.userType}`,
                        userType: user.userType,
                        username: user.username,
                        zj: user.zjarea + `${user.zjnumber}` + user.zjother,
                        nickName: user.nickName
                        // departName:user.departName,
                    }).then(res => {
                        if (res.code === 200) {