| | |
| | | <div class="input-header__tip">填写事件基础信息</div> |
| | | </div> |
| | | <div class="input-form"> |
| | | <el-form ref="user" label-width="160px" autoComplete="on" :model="role" :rules="createRoleRules" |
| | | label-position="right"> |
| | | <!-- 问题类型 --> |
| | | <el-form-item class="optionItem" label="问题类型:" prop="name"> |
| | | <el-select v-model="role.type" placeholder="违建"> |
| | | <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value" |
| | | :disabled="item.disabled"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 违建类别 --> |
| | | <el-form-item class="optionItems" label="违建类别:" prop="status"> |
| | | <el-select v-model="role.big" placeholder="请选择违建类别" size="small"> |
| | | <el-option v-for="item in bigKindList" :key="item.id" :label="item.name" :value="item.id" |
| | | :disabled="item.disabled"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form |
| | | ref="user" |
| | | label-width="160px" |
| | | autoComplete="on" |
| | | :model="ill" |
| | | :rules="createillRules" |
| | | label-position="right" |
| | | > |
| | | <div class="user-item"> |
| | | <!-- 问题类型 --> |
| | | <el-form-item |
| | | class="optionItem" |
| | | label="问题类型:" |
| | | prop="category" |
| | | > |
| | | <el-select |
| | | v-model="ill.type" |
| | | placeholder="违建" |
| | | disabled |
| | | > |
| | | <el-option |
| | | v-for="item in communityList" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | :disabled="item.disabled" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 违建类别 --> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="违建类别:" |
| | | prop="categoryId" |
| | | > |
| | | <el-select |
| | | v-model="ill.categoryId" |
| | | placeholder="请选择违建类别" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in bigKindList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | :disabled="item.disabled" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <!-- 当事人姓名 --> |
| | | <el-form-item class="optionItems" label="当事人姓名:" prop="status"> |
| | | <el-input placeholder="请填写当事人姓名"></el-input> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="当事人姓名:" |
| | | prop="partyName" |
| | | > |
| | | <el-input |
| | | placeholder="请填写当事人姓名" |
| | | v-model="ill.partyName" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 当事人身份证号 --> |
| | | <el-form-item class="optionItems" label="当事人身份证号:" prop="status"> |
| | | <el-input placeholder="请填写当事人身份证号"></el-input> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="当事人身份证号:" |
| | | prop="partyIdCard" |
| | | > |
| | | <el-input |
| | | placeholder="请填写当事人身份证号" |
| | | maxlength="18" |
| | | v-model="ill.partyIdCard" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 当事人联系电话 --> |
| | | <el-form-item class="optionItem" label="当事人联系电话:" prop="description"> |
| | | <el-input v-model="role.description" placeholder="请填写当事人联系电话"></el-input> |
| | | <el-form-item |
| | | class="optionItem" |
| | | label="当事人联系电话:" |
| | | prop="partyPhone" |
| | | > |
| | | <el-input |
| | | v-model="ill.partyPhone" |
| | | maxlength="11" |
| | | placeholder="请填写当事人联系电话" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- 违建地点 --> |
| | | <el-form-item class="optionItems" label="违建地点:" prop="status"> |
| | | <el-input placeholder="请填写违建地点"></el-input> |
| | | </el-form-item> |
| | | <!-- 所属社区 --> |
| | | <el-form-item class="optionItems" label="所属社区:" prop="status"> |
| | | <el-select v-model="role.type" placeholder="请选择所属社区"> |
| | | <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value" |
| | | :disabled="item.disabled"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="user-item"> |
| | | <!-- 违建地点 --> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="违建地点:" |
| | | prop="site" |
| | | > |
| | | <el-input |
| | | placeholder="请填写违建地点" |
| | | v-model="ill.site" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="user-item"> |
| | | <!-- 所属街道 --> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="所属街道:" |
| | | prop="streetId" |
| | | > |
| | | <el-select |
| | | v-model="ill.streetId" |
| | | placeholder="请选择所属街道" |
| | | @change="handleStreet" |
| | | > |
| | | <el-option |
| | | v-for="item in streetList" |
| | | :key="item.id" |
| | | :label="item.regionName" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 所属社区 --> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="所属社区:" |
| | | prop="communityId" |
| | | > |
| | | <el-select |
| | | v-model="ill.communityId" |
| | | placeholder="请选择所属社区" |
| | | > |
| | | <el-option |
| | | v-for="item in communityList" |
| | | :key="item.id" |
| | | :label="item.regionName" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <!-- 身份证正反面照片 --> |
| | | <el-form-item class="optionItems" label="身份证正反面照片:" prop="status"> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="身份证正、反面照片:" |
| | | prop="positive" |
| | | > |
| | | <template> |
| | | <div class="idcard"> |
| | | <el-upload class="upload-demo" |
| | | :show-file-list = "false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" |
| | | :headers="getToken()" multiple :limit="50"> |
| | | <img src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg" |
| | | alt=""> |
| | | <span class="text">身份证正面</span> |
| | | <!-- <el-upload--> |
| | | <!-- action="/sccg/file/medias"--> |
| | | <!-- list-type="picture-card"--> |
| | | <!-- :show-file-list="false"--> |
| | | <!-- :headers="getToken()" multiple--> |
| | | <!-- :limit="50" :on-success="handleSuccess">--> |
| | | <!-- <i class="el-icon-plus"></i>--> |
| | | <!-- <span class="text" v-if="ill.positive === ''">身份证正面</span>--> |
| | | <!-- <img :src="ill.positive" alt="" class="img" v-else>--> |
| | | <!-- </el-upload>--> |
| | | <el-upload |
| | | list-type="picture-card" |
| | | class="upload-demo" |
| | | :show-file-list="false" |
| | | action="/sccg/file/medias" |
| | | :headers="getToken()" |
| | | multiple |
| | | :limit="50" |
| | | :on-success="handleSuccess" |
| | | > |
| | | <!-- <img v-if="ill.positive === ''"--> |
| | | <!-- src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg"--> |
| | | <!-- alt="">--> |
| | | <i |
| | | v-if="ill.positive === ''" |
| | | class="el-icon-plus" |
| | | ></i> |
| | | <span |
| | | class="text" |
| | | v-if="ill.positive === ''" |
| | | >身份证正面</span |
| | | > |
| | | <img |
| | | :src="ill.positive" |
| | | alt="" |
| | | class="img" |
| | | v-else |
| | | /> |
| | | </el-upload> |
| | | <el-upload class="upload-demo" |
| | | :show-file-list = "false" |
| | | action="http://42.193.1.25:8082/sccg/file/medias" |
| | | :headers="getToken()" multiple :limit="50"> |
| | | <img src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg" |
| | | alt=""> |
| | | <span class="text">身份证反面</span> |
| | | <el-upload |
| | | list-type="picture-card" |
| | | class="upload-demo" |
| | | :show-file-list="false" |
| | | action="/sccg/file/medias" |
| | | :headers="getToken()" |
| | | multiple |
| | | :limit="50" |
| | | :on-success="handleSuccess2" |
| | | > |
| | | <!-- <img v-if="ill.negative === '' "--> |
| | | <!-- src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__15f765432d579a14b8f6591c100d30e3.svg"--> |
| | | <!-- alt="">--> |
| | | <i |
| | | v-if="ill.negative === ''" |
| | | class="el-icon-plus" |
| | | ></i> |
| | | <span |
| | | class="text" |
| | | v-if="ill.negative === ''" |
| | | >身份证反面</span |
| | | > |
| | | <img |
| | | :src="ill.negative" |
| | | alt="" |
| | | class="img" |
| | | v-else |
| | | /> |
| | | </el-upload> |
| | | </div> |
| | | </template> |
| | | </el-form-item> |
| | | <!-- 报警时间 --> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="报警时间:" |
| | | prop="alarmTime" |
| | | > |
| | | <el-date-picker |
| | | v-model="ill.alarmTime" |
| | | type="datetime" |
| | | placeholder="选择报警时间" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="not-need"> |
| | | <div class="not-need__header"> |
| | | 执法违建情况 |
| | | </div> |
| | | <div class="not-need-item"> |
| | | <label>违建具体位置:</label> |
| | | <input type="text" class="not-need__inner"> |
| | | </div> |
| | | <div class="not-need-item"> |
| | | <label>违法建设长、宽、高:</label> |
| | | <input type="text" class="not-need__inner"> |
| | | </div> |
| | | <div class="not-need-item"> |
| | | <label>违法建设面积:</label> |
| | | <input type="text" class="not-need__inner"> |
| | | </div> |
| | | <div class="not-need-item"> |
| | | <label>违法建筑材料:</label> |
| | | <input type="text" class="not-need__inner"> |
| | | </div> |
| | | <div class="not-need__header">执法违建情况</div> |
| | | <el-form |
| | | ref="condition" |
| | | label-width="160px" |
| | | autoComplete="on" |
| | | :model="ill" |
| | | :rules="createillRules" |
| | | > |
| | | <!-- 违建具体位置 --> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="违建具体位置:" |
| | | prop="position" |
| | | > |
| | | <el-input |
| | | placeholder="请填写违建具体位置" |
| | | v-model="ill.position" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <div class="area"> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="违法建设长、宽、高:" |
| | | prop="buildingLength" |
| | | > |
| | | <el-input |
| | | placeholder="单位米" |
| | | v-model="ill.buildingLength" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label-width="0px" |
| | | prop="buildingWidth" |
| | | > |
| | | <el-input |
| | | placeholder="单位米" |
| | | v-model="ill.buildingWidth" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label-width="0px" |
| | | prop="buildingHigh" |
| | | > |
| | | <el-input |
| | | placeholder="单位米" |
| | | v-model="ill.buildingHigh" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="违法建设面积:" |
| | | prop="buildingArea" |
| | | > |
| | | <el-input |
| | | placeholder="请填写违法建设面积" |
| | | v-model="ill.buildingArea" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | class="optionItems" |
| | | label="违法建筑材料:" |
| | | prop="materials" |
| | | > |
| | | <el-input |
| | | placeholder="请填写违法建筑材料" |
| | | v-model="ill.materials" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="input-footer"> |
| | | <el-button type="primary" class="confirm">确定</el-button> |
| | | <el-button class="back">返回</el-button> |
| | | <el-button type="primary" class="confirm" @click="handleUser" |
| | | >确定</el-button |
| | | > |
| | | <el-button class="back" @click="handleBack">返回</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="map-area"> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import MyMap from '@/components/map' |
| | | // import MyMap from "@/components/map"; |
| | | import MyMap from "@/components/map/leafletMap.vue"; |
| | | import { parseTime, FILE_ORIGINAL_PATH } from '@/utils/index' |
| | | import { validateName, validatePhone, validateCardId, validateNum } from '@/utils/validate' |
| | | export default { |
| | | components: { |
| | | MyMap |
| | | }, |
| | | data() { |
| | | const validateNickname = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error("请填写问题类型")); |
| | | const checkArea = (rule, value, callback) => { |
| | | if (value) { |
| | | validateNum(value) ? callback() : callback(new Error('请输入正确的违法建设面积')) |
| | | } else { |
| | | callback(); |
| | | callback(new Error('违法建设面积不能为空')) |
| | | } |
| | | }; |
| | | const validatePass = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(); |
| | | } |
| | | const checkHigh = (rule, value, callback) => { |
| | | if (value) { |
| | | validateNum(value) ? callback() : callback(new Error('请输入正确的违法建设高度')) |
| | | } else { |
| | | // const rep = /^\w+$/; |
| | | // if (!rep.test(value)) { |
| | | // callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串")); |
| | | // } |
| | | callback(); |
| | | callback(new Error('违法建设高度不能为空')); |
| | | |
| | | } |
| | | }; |
| | | const validateTruename = (rule, value, callback) => { |
| | | } |
| | | const checkWidth = (rule, value, callback) => { |
| | | if (value) { |
| | | validateNum(value) ? callback() : callback(new Error('请输入正确的违法建设宽度')) |
| | | } else { |
| | | callback(new Error('违法建设宽度不能为空')); |
| | | |
| | | } |
| | | } |
| | | const checkLength = (rule, value, callback) => { |
| | | if (value) { |
| | | validateNum(value) ? callback() : callback(new Error('请输入正确的违法建设长度')) |
| | | } else { |
| | | callback(new Error('违法建设长度不能为空')); |
| | | |
| | | } |
| | | } |
| | | const checkCategoryId = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | // const rep = /^[\u4E00-\u9FA5]{2,4}$/; |
| | | // if (!rep.test(value)) { |
| | | // callback("请输入正确的用户姓名"); |
| | | // } |
| | | callback(); |
| | | callback(new Error('违建类别不能为空')); |
| | | } |
| | | }; |
| | | } |
| | | const checkCommunityId = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('所属社区不能为空')); |
| | | } |
| | | } |
| | | const checkMaterials = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('违法建筑材料不能为空')); |
| | | } |
| | | } |
| | | const checkIdCard = (rule, value, callback) => { |
| | | if (value) { |
| | | validateCardId(value) ? callback() : callback(new Error('请输入正确的身份证号码')) |
| | | } else { |
| | | callback(new Error('当事人身份证号码不能为空')); |
| | | } |
| | | } |
| | | const checkName = (rule, value, callback) => { |
| | | if (value) { |
| | | validateName(value) ? callback() : callback(new Error('请输入正确的当事人信息')) |
| | | } else { |
| | | callback(new Error('当事人姓名不能为空')); |
| | | } |
| | | } |
| | | const checkPhone = (rule, value, callback) => { |
| | | if (value) { |
| | | validatePhone(value) ? callback() : callback(new Error('请输入正确的手机号码')) |
| | | } else { |
| | | callback(new Error('当事人联系电话不能为空')); |
| | | } |
| | | } |
| | | const checkPosition = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('违法建设具体位置不能为空')); |
| | | } |
| | | } |
| | | const checkPositive = (rule, value, callback) => { |
| | | if (value) { |
| | | if (this.ill.negative === '') { |
| | | callback('身份证反面不能为空'); |
| | | } else { |
| | | callback(); |
| | | } |
| | | } else { |
| | | callback(new Error('身份证正面不能为空')); |
| | | |
| | | } |
| | | } |
| | | const checkSite = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('违法建设地点不能为空')); |
| | | } |
| | | } |
| | | const checkDate = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('报警时间不能为空')) |
| | | } |
| | | } |
| | | const checkStreet = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('所属街道不能为空')) |
| | | } |
| | | } |
| | | return { |
| | | role: { |
| | | name: '', |
| | | type: '', |
| | | description: '', |
| | | ill: { |
| | | buildingArea: '', |
| | | buildingHigh: '', |
| | | buildingLength: '', |
| | | buildingWidth: '', |
| | | // category: '', |
| | | categoryId: '', |
| | | communityId: '', |
| | | materials: "", |
| | | partyIdCard: "", |
| | | partyName: "", |
| | | partyPhone: "", |
| | | position: "", |
| | | positive: "", |
| | | negative: "", |
| | | site: "", |
| | | alarmTime: '', |
| | | }, |
| | | createRoleRules: { |
| | | name: [ |
| | | { required: true, trigger: "blur", validator: validateNickname }, |
| | | createillRules: { |
| | | buildingArea: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkArea |
| | | } |
| | | ], |
| | | type: [ |
| | | { required: false, trigger: "blur", validator: validatePass }, |
| | | buildingHigh: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkHigh |
| | | } |
| | | ], |
| | | description: [ |
| | | { required: false, trigger: "blur", validator: validateTruename }, |
| | | buildingLength: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkLength |
| | | } |
| | | ], |
| | | buildingWidth: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkWidth |
| | | } |
| | | ], |
| | | categoryId: [ |
| | | { |
| | | required: true, trigger: 'change', validator: checkCategoryId |
| | | } |
| | | ], |
| | | communityId: [ |
| | | { |
| | | required: true, trigger: 'change', validator: checkCommunityId |
| | | } |
| | | ], |
| | | materials: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkMaterials |
| | | } |
| | | ], |
| | | partyIdCard: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkIdCard |
| | | } |
| | | ], |
| | | partyName: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkName |
| | | } |
| | | ], |
| | | partyPhone: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkPhone |
| | | } |
| | | ], |
| | | position: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkPosition |
| | | } |
| | | ], |
| | | positive: [ |
| | | { |
| | | required: true, trigger: 'change', validator: checkPositive |
| | | } |
| | | ], |
| | | site: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkSite |
| | | } |
| | | ], |
| | | alarmTime: [ |
| | | { |
| | | required: true, trigger: 'change', validator: checkDate |
| | | } |
| | | ], |
| | | streetId: [ |
| | | { |
| | | required: true, trigger: 'change', validator: checkStreet |
| | | } |
| | | ], |
| | | }, |
| | | bigKindList: [], |
| | | typeList: [], |
| | | communityList: [ |
| | | ], |
| | | streetList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | const { getBigKind, getEventLevel, getSmallKind } = this; |
| | | const { getBigKind, getCommityList, getStreetList } = this; |
| | | getStreetList(0); |
| | | |
| | | // this.ill.category = this.mytype + 1; |
| | | getBigKind(); |
| | | getCommityList(); |
| | | }, |
| | | methods: { |
| | | handleUser() { |
| | | this.$refs['user'].validate((valid) => { |
| | | console.log(valid); |
| | | const that = this; |
| | | this.$refs.user.validate((valid) => { |
| | | if (valid) { |
| | | const { role } = this; |
| | | console.log(role); |
| | | this.$axios.post('sccg/role/create', { |
| | | description: role.description, name: role.name, type: role.type |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.refresh(); |
| | | that.$refs.condition.validate((flag) => { |
| | | if (flag) { |
| | | const { ill } = this; |
| | | ill.buildingLength = parseFloat(ill.buildingLength); |
| | | ill.buildingHigh = parseFloat(ill.buildingHigh); |
| | | ill.buildingWidth = parseFloat(ill.buildingWidth); |
| | | ill.buildingArea = parseFloat(ill.buildingArea); |
| | | |
| | | ill.negative = ill.negative.replace(FILE_ORIGINAL_PATH, "") |
| | | ill.positive = ill.positive.replace(FILE_ORIGINAL_PATH, "") |
| | | that.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/base_case/addition_illegal_building', |
| | | data: { |
| | | ...ill, |
| | | alarmTime: parseTime(ill.alarmTime) |
| | | }, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: res.message |
| | | }) |
| | | this.$emit('changeDialog', { flag: false }); |
| | | this.refresh(); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.message, |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | handleStop() { |
| | | this.refresh(); |
| | | }, |
| | | // 获取大类列表 |
| | | getBigKind() { |
| | |
| | | url: 'sccg/illegal_building/query/type_second' |
| | | }).then(res => { |
| | | this.bigKindList = res.data; |
| | | // console.log(res); |
| | | }) |
| | | }, |
| | | // 获取行政区域 |
| | | // 获取token |
| | | getToken() { |
| | | const token = sessionStorage.getItem('token'); |
| | |
| | | if (token && tokenHead) { |
| | | return { Authorization: tokenHead + token }; |
| | | } |
| | | }, |
| | | handleSuccess(res, file, filelist) { |
| | | this.ill.positive = `${FILE_ORIGINAL_PATH}` + res.data; |
| | | // this.ill.positive = res.data |
| | | // let oll =this.ill.positive |
| | | // let that=this |
| | | // this.$axios({ |
| | | // url:'sccg/API/img?fileUrl='+res.data, |
| | | // method:"get", |
| | | // responseType: 'blob' |
| | | // }).then(res=>{ |
| | | |
| | | // const blob = new Blob([res]) |
| | | // var reader = new window.FileReader(); |
| | | // reader.readAsDataURL(blob); |
| | | // reader.onloadend = function () { |
| | | |
| | | // that.ill.positive= reader.result |
| | | // } |
| | | |
| | | // }) |
| | | |
| | | }, |
| | | handleSuccess2(res, file, filelist) { |
| | | this.ill.negative = `${FILE_ORIGINAL_PATH}` + res.data; |
| | | // this.ill.negative = res.data |
| | | // let that=this |
| | | // this.$axios({ |
| | | // url:'sccg/API/img?fileUrl='+res.data, |
| | | // method:"get", |
| | | // responseType: 'blob' |
| | | // }).then(res=>{ |
| | | |
| | | // const blob = new Blob([res]) |
| | | // var reader = new window.FileReader(); |
| | | // reader.readAsDataURL(blob); |
| | | // reader.onloadend = function () { |
| | | // console.log(reader.result) |
| | | // that.ill.negative= reader.result |
| | | // } |
| | | |
| | | // }) |
| | | }, |
| | | |
| | | // 查询社区 |
| | | getCommityList() { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: 'sccg/dict/query_type?level=1&typeCode=' + '10' |
| | | }) |
| | | .then(res => { |
| | | }) |
| | | }, |
| | | // 获取街道信息 |
| | | async getStreetList(id) { |
| | | let arr |
| | | await this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/sccg_region/getChildren/${id}`, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | arr = res.data; |
| | | } |
| | | }) |
| | | this.streetList = arr; |
| | | }, |
| | | // 街道更改 |
| | | handleStreet(id) { |
| | | this.ill.communityId = ''; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/sccg_region/getChildren/${id}` |
| | | }) |
| | | .then(res => { |
| | | this.communityList = res.data; |
| | | }) |
| | | }, |
| | | handleBack() { |
| | | this.$emit('changeDialog', { flag: false }); |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | 'ill.buildingLength': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.ill.buildingWidth !== '' && validateNum(newVal) && validateNum(this.ill.buildingWidth) ? this.ill.buildingArea = newVal * this.ill.buildingWidth : ''; |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | 'ill.buildingWidth': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.ill.buildingLength !== '' && validateNum(newVal) && validateNum(this.ill.buildingLength) ? this.ill.buildingArea = newVal * this.ill.buildingLength : ''; |
| | | } |
| | | }, |
| | | deep: true, |
| | | } |
| | | }, |
| | | props: ['mytype', 'changeDialog', 'refresh'] |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .ill { |
| | | display: flex; |
| | | padding: 20px 10px 50px; |
| | | |
| | | .user-item { |
| | | display: flex; |
| | | } |
| | | |
| | | .input-area { |
| | | flex: 1; |
| | | flex: 3; |
| | | padding: 10px 20px; |
| | | |
| | | .input-header { |
| | |
| | | line-height: 40px; |
| | | } |
| | | } |
| | | .el-form { |
| | | // &::v-deep .el-form-item__label { |
| | | // color: #4b9bb7; |
| | | // } |
| | | |
| | | // &::v-deep .el-input__inner { |
| | | // // background-color: #09152f; |
| | | // border: 1px solid #17324c; |
| | | // } |
| | | |
| | | // &::v-deep .el-textarea__inner { |
| | | // // background-color: #09152f; |
| | | // border: 1px solid #17324c; |
| | | // } |
| | | } |
| | | .input-form { |
| | | |
| | | &::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | &::v-deep .el-textarea__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | .upload-demo{ |
| | | .upload-demo { |
| | | position: relative; |
| | | .text{ |
| | | margin-right: 20px; |
| | | .text { |
| | | position: absolute; |
| | | top: 22%; |
| | | left: 20%; |
| | | left: 26%; |
| | | } |
| | | } |
| | | |
| | | .idcard { |
| | | display: flex; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | .map-area { |
| | | flex: 1; |
| | | .img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .not-need { |
| | | .not-need__header { |
| | | line-height: 40px; |
| | | } |
| | | .area { |
| | | display: flex; |
| | | } |
| | | |
| | | .not-need-item { |
| | | line-height: 40px; |
| | | margin-bottom: 22px; |
| | | display: flex; |
| | | |
| | | label { |
| | | width: 160px; |
| | | padding-right: 12px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .not-need__inner { |
| | | flex: 1; |
| | | line-height: 40px; |
| | | padding: 0 15px; |
| | | border-radius: 4px; |
| | | color: #fff; |
| | | // outline: #409eff solid 1px; |
| | | outline: none; |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | | .map-area { |
| | | flex: 2; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |