Your Name
2022-09-26 df06d5adebeedb5edca6264450671792ccbd9d4e
修改
已修改9个文件
3965 ■■■■ 文件已修改
src/App.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intellectInspect/intelligentLine/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loginPage/component/accountLogin.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/specialWorkSystem/foundationSet/material/index.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/specialWorkSystem/workFlow/approveRule/components/approveLevelDialog.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/department/component/deptDialog.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
yarn.lock 3810 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -1,9 +1,9 @@
<template>
    <!--    <transition name="fade" mode="out-in">-->
    <!--        <keep-alive :exclude="excludeList">-->
    <!--            <router-view v-if="!$route.meta.iskeepAlive" :key="$route.id"></router-view>-->
    <!--        </keep-alive>-->
    <!--    </transition>-->
<!--        <transition name="fade" mode="out-in">-->
<!--            <keep-alive :exclude="excludeList">-->
<!--                <router-view v-if="!$route.meta.iskeepAlive" :key="$route.path"></router-view>-->
<!--            </keep-alive>-->
<!--        </transition>-->
    <!--    <router-view v-if="!$route.meta.iskeepAlive" v-slot="{ Component }">-->
    <!--        <transition name="fade" mode="in-out">-->
    <!--            <keep-alive :exclude="excludeList" :include="includeList">-->
src/utils/request.ts
@@ -66,12 +66,12 @@
        } else if (response.data.code && response.data.code === 'A0215') {
            ElMessage.error('token失效');
            // logOut;
            useLoginApi()
                .signOut()
                .then(() => {
                    Session.clear();
                    window.location.href = '/';
                });
            // useLoginApi()
            //     .signOut()
            //     .then(() => {
            //         Session.clear();
            //         window.location.href = '/';
            //     });
        }
        // if(response.data.code && response.data.code !== '200'){
        return Promise.resolve(response);
src/views/intellectInspect/intelligentLine/index.vue
@@ -151,6 +151,7 @@
                    alert('您的浏览器不支持socket');
                } else {
                    // 实例化socket
                    debugger
                    let uid =  userInfos.value.uid.toString()
                    var url = state.path + uid + '*' + id;
                    console.log(url,'url',uid,'uid')
@@ -186,6 +187,7 @@
        // 接口获取数据
        const getLine = async (id:string) => {
            debugger
            let res = await lineApi().getLine({ id: id });
            if (res.data.code === '200') {
                userInfos.value.dataList = res.data.data;
src/views/loginPage/component/accountLogin.vue
@@ -125,7 +125,7 @@
        const hasUserCodeOrPassword =()=> {
            if (localStorage.getItem('userCode') && localStorage.getItem('userPassword')) {
                state.ruleForm.username = localStorage.getItem('userCode')
                state.ruleForm.username = localStorage.getItem('userCode') as string
                state.ruleForm.password = Base64.decode(localStorage.getItem('userPassword'))//解密
                state.saveCode = true
            }
src/views/specialWorkSystem/foundationSet/material/index.vue
@@ -556,28 +556,59 @@
            let res = await materialApi().getRecordList();
            if (res.data.code === '200') {
                state.allList  = JSON.parse(JSON.stringify(res.data.data))
                state.checkData = state.allList.map((item)=>{
                    if(item.list && item.list != null){
                        console.log('1111111111111')
                        item.list.map((i)=>{
                            i.checked = false
                            i.defaultVal = null
                            i.configurationLevel = null
                            i.consumables = false
                            return {
                                checked: i.checked,
                                materialName: i.name,
                                consumables: i.consumables,
                                defaultVal: i.defaultVal,
                                configurationLevel: i.configurationLevel,
                                materialType: i.materialType,
                                materialTypeName: i.materialTypeName,
                                emergencyMaterialId: i.id
                            }
                        })
                    }
                    return item
                })
                // const test = [{id:1,name:'1',children:[{one:1,two:'1'},]},{id:2,name:'2',children:[{one:2,two:'2'},]}]
                // test.map(item => {
                //     item.children.map(i =>{
                //         debugger
                //         return {
                //             three:true
                //         }
                //         const obj = i
                //         console.log(obj);
                //     })
                //     return item
                // })
                // console.log(test);
                for(let i in state.allList){
                    state.allList[i].list = state.allList[i].list?.map((item:any) => {
                        const obj = {
                            checked: false,
                            materialName: item.name,
                            consumables: false,
                            defaultVal: null,
                            configurationLevel: null,
                            materialType: item.materialType,
                            materialTypeName: item.materialTypeName,
                            emergencyMaterialId: item.id
                        }
                        return {...obj}
                    })
                }
                state.checkData = JSON.parse(JSON.stringify(state.allList))
                // state.checkData = state.allList.map((item)=>{
                //     if(item.list && item.list != null){
                //         console.log('1111111111111')
                //         item.list.map((i)=>{
                //             i.checked = false
                //             i.defaultVal = null
                //             i.configurationLevel = null
                //             i.consumables = false
                //             debugger
                //             const obj = {
                //                 checked: i.checked,
                //                 materialName: i.name,
                //                 consumables: i.consumables,
                //                 defaultVal: i.defaultVal,
                //                 configurationLevel: i.configurationLevel,
                //                 materialType: i.materialType,
                //                 materialTypeName: i.materialTypeName,
                //                 emergencyMaterialId: i.id
                //             }
                //             return {...obj}
                //         })
                //     }
                //     return item
                // })
            } else {
                ElMessage({
                    type: 'warning',
src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue
@@ -23,7 +23,7 @@
            <el-col v-if="(approveItemForm.type === 2 || approveItemForm.type === 3) && personType !== 3" :span="24" style="margin-bottom: 24px">
                <el-form-item label="措施名称" prop="measureId">
                    <el-select v-model="approveItemForm.measureId" placeholder="请选择措施" class="input-add" clearable filterable>
                        <el-option v-for="item in actionList" :key="item.id" :value="item.id" :label="item.context"></el-option>
                        <el-option v-for="item in approveTypeList" :key="item.id" :value="item.id" :label="item.context"></el-option>
                    </el-select>
                </el-form-item>
            </el-col>
@@ -54,6 +54,7 @@
    approveItemFormRule: {};
    actionList: Array<type>;
    typeList: Array<type>;
    approveTypeList: Array<type>;
    smTypeList: Array<type>;
    standardList: [];
    order: number | null;
@@ -69,6 +70,7 @@
interface type {
    id: number;
    name: string;
    type?:number;
}
export default {
    name: 'approveItemDialog',
@@ -94,6 +96,7 @@
            },
            actionList: [],
            typeList: [],
            approveTypeList: [],
            smTypeList: [
                { id: 1, name: '标准' },
                { id: 2, name: '措施' }
@@ -157,8 +160,12 @@
        const clearValue = () => {
            if (data.approveItemForm.type === 1) {
                data.approveItemForm.measureId = null;
            }else if(data.approveItemForm.type === 2){
                data.approveItemForm.standId = null;
                data.approveTypeList = data.actionList.filter(item => item.type === 1)
            } else {
                data.approveItemForm.standId = null;
                data.approveTypeList = data.actionList.filter(item => item.type === 2)
            }
        };
src/views/specialWorkSystem/workFlow/approveRule/components/approveLevelDialog.vue
@@ -104,6 +104,7 @@
    userList: [];
    timeList: Array<type>;
    typeList: Array<type>;
    approveTypeList: Array<type>;
    workLevelList: [];
    standardList: Array<stand>;
    actionList: Array<action>;
@@ -171,6 +172,11 @@
                { id: 1, name: '单人' },
                { id: 2, name: '多人' },
                { id: 3, name: '分析人' }
            ],
            approveTypeList: [
                { id: 1, name: '数值' },
                { id: 2, name: '选项' },
                { id: 3, name: '填空' }
            ],
            workLevelList: [],
            actionList: [],
@@ -274,7 +280,7 @@
        const parseNumber = (value: number, type: string) => {
            if (type === '审批项类型') {
                return data.typeList.find((item) => item.id === value)?.name;
                return data.approveTypeList.find((item) => item.id === value)?.name;
            } else if (type === '措施名称') {
                return data.actionList.find((item) => item.id === value)?.context;
            } else {
src/views/system/department/component/deptDialog.vue
@@ -4,18 +4,30 @@
            <el-form :model="departmentForm" size="default" label-width="90px">
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="部门等级">
                            <el-select v-model="departmentForm.depLevel" placeholder="请输入部门等级" class="input-add" clearable>
                                <el-option
                                v-for="item in depLevelList"
                                :key="item.id"
                                :label="item.name"
                                :value="item.id"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="上级部门">
                            <el-cascader :options="deptData" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable class="w100" v-model="departmentForm.parentDepId"> </el-cascader>
                            <el-cascader :options="deptData" class="input-add" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable v-model="departmentForm.parentDepId"> </el-cascader>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="部门名称">
                            <el-input v-model="departmentForm.depName" placeholder="请输入部门名称" clearable></el-input>
                            <el-input v-model="departmentForm.depName" class="input-add" placeholder="请输入部门名称" clearable></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="部门描述">
                            <el-input v-model="departmentForm.depInfo" type="textarea" placeholder="请输入部门描述" maxlength="150"></el-input>
                            <el-input v-model="departmentForm.depInfo" class="input-add" type="textarea" placeholder="请输入部门描述" maxlength="150"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
@@ -49,8 +61,14 @@
        depName: string;
        depInfo: string;
        parentDepId: string;
        depLevel:null | number
    };
    deptData: Array<TableDataRow>;
    depLevelList: Array<Type>;
}
interface Type{
    id:number;
    name:string
}
export default defineComponent({
@@ -62,10 +80,18 @@
            departmentForm: {
                depName: '',
                parentDepId: '',
                depInfo: ''
                depInfo: '',
                depLevel:null,
            },
            deptData: [] // 部门数据
            deptData: [], // 部门数据
            depLevelList: [
                {id:1,name:'公司'},
                {id:2,name:'事业部'},
                {id:3,name:'车间'},
                {id:4,name:'班组'}
            ] // 部门数据
        });
        // 打开弹窗
        const openDialog = (type: string, value: any, departmentList: []) => {
            state.isShowDialog = true;
@@ -75,6 +101,7 @@
                state.departmentForm = {
                    depName: '',
                    parentDepId: '',
                    depLevel:null,
                    depInfo: ''
                };
            } else {
yarn.lock
文件太大