Your Name
2022-07-23 a3bd29f6e592bde951b309f6f628d158cfc7c6c3
src/views/doublePreventAction/riskLevelManage/safetyRiskSpace/index.vue
@@ -2,17 +2,6 @@
    <div class="app-container">
        <div class="filter-container">
            <div class="basic_search">
                <span>企业名称:</span>
                <el-select v-model="listQuery.eid" class="analyseUnit_input">
                    <el-option
                        v-for="item in companyList"
                        :key="item.id"
                        :label="item.company"
                        :value="item.id"
                    ></el-option>
                </el-select>
            </div>
            <div class="basic_search">
                <span>状态:</span>
                <el-select v-model="listQuery.status" class="analyseUnit_input">
                    <el-option
@@ -185,7 +174,6 @@
                    status: null
                },
                listQuery:{
                    eid:'',
                    status:0,
                },
            }
@@ -198,7 +186,6 @@
            async getSafetyRiskSpaceData(){
                this.listLoading = true
                let params = {}
                params["eid"] = (this.listQuery.eid === '' ? Cookies.get('companyid') : this.listQuery.eid)
                params["status"] = this.listQuery.status
                let res = await getSafetyRiskSpaceList(params)
                if(res.data.code === '200'){
@@ -241,20 +228,21 @@
                if(type === '新增'){
                    this.title = '新增'
                    this.safetyRiskSpaceForm = {
                        createUid: Cookies.get('userId'),
                        createUid: parseInt(Cookies.get('userId')),
                        descInfo: null,
                        img: null,
                    }
                    this.fileList = []
                }else{
                    this.title = '查看'
                    this.safetyRiskSpaceForm = value
                    this.fileList = []
                    this.fileList.push({url:value.img})
                }
            },
            submitSafetyRiskSpace(){
                this.$refs["safetyRiskSpaceForm"].validate((valid) =>{
                    if(valid){
                        debugger
                        addSafetyRiskSpace(this.safetyRiskSpaceForm).then((res)=>{
                            if(res.data.code === '200'){
                                this.safetyRiskSpaceVisible = false
@@ -305,8 +293,8 @@
            },
            onFileSuccess(response){
                if(response.code === '200'){
                    debugger
                    this.safetyRiskSpaceForm.img = response.result.path
                    this.fileList = []
                    this.fileList.push({url:process.env.IMG_API + response.result.path})
                    this.$notify({
                        type:'success',
@@ -322,7 +310,6 @@
                }
            },
            handleFile(file){
                debugger
                this.dialogImageUrl = file.url;
                this.dialogVisible = true;
            },