| | |
| | | </el-form-item>--> |
| | | <el-form-item label="检查时间"> |
| | | <el-col :span="11"> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.check_dateStart" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.check_dateStart" |
| | | style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker> |
| | | </el-col> |
| | | <el-col style="text-align:center" :span="2">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.check_dateEnd" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.check_dateEnd" |
| | | style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker> |
| | | </el-col> |
| | | </el-form-item> |
| | | <el-form-item label="限改时间"> |
| | | <el-col :span="11"> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeStart" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeStart" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | </el-col> |
| | | <el-col style="text-align:center" :span="2">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeEnd" value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.alter_timeEnd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | </el-col> |
| | | </el-form-item> |
| | | <el-form-item style="text-align:center;padding:0 50px"> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询 |
| | | </el-button> |
| | | <el-button type="primary" class="btns" size="small" @click="reset()">重置</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-upload2">导出excel</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row class="title-center"> |
| | | <el-col :span="24" style="text-align:right;"> |
| | | <el-button class="btns" type="primary" size="small" @click="dialogVisible=true">申请延期</el-button> |
| | | <el-button class="btns" type="primary" size="small" @click="applyDelay()">申请延期</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-table :data="tableData" ref="dangerRectificationTable" style="width: 100%"> |
| | | <el-table-column type="selection" width="55" align="center"></el-table-column> |
| | | <el-table-column prop="number" label="编号" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="check_branch" label="检查部门" align="center" width="120"></el-table-column> |
| | |
| | | :close-on-click-modal="false" |
| | | width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" class="demo-ruleForm"> |
| | | <el-row> |
| | | <el-col :span="16" :offset="3"> |
| | | <el-form-item label="申请限改时间" prop="name"> |
| | | <el-form-item label="申请限改时间" prop="application_time"> |
| | | <el-date-picker |
| | | v-model="value1" |
| | | v-model="ruleForm.application_time" |
| | | :picker-options="pickerOptions" |
| | | type="date" |
| | | :disabled="true" |
| | | :disabled="false" |
| | | placeholder="选择日期" |
| | | style="width: 100%"> |
| | | </el-date-picker> |
| | |
| | | <el-upload |
| | | class="upload-demo" |
| | | ref="upload" |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :http-request="uploadSectionFile" |
| | | :on-preview="handlePreview" |
| | | :on-remove="handleRemove" |
| | | :file-list="fileList" |
| | | :before-upload="beforeUpload" |
| | | :auto-upload="true"> |
| | | :auto-upload="true" |
| | | > |
| | | <el-button slot="trigger" size="small" type="primary" class="btns">选择文件</el-button> |
| | | <div slot="tip" class="el-upload__tip">只能上传.jpg,.gif,.bmp,.png,.jpeg格式的图片</div> |
| | | </el-upload> |
| | |
| | | <el-row> |
| | | <el-col :span="16" :offset="3"> |
| | | <el-form-item label="备注" prop="desc"> |
| | | <el-input class="textarea" type="textarea" v-model="ruleForm.desc"></el-input> |
| | | <el-input class="textarea" type="textarea" v-model="ruleForm.remark"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="text-align: center"> |
| | | <el-button class="btns" size="small" type="primary" @click="dialogVisible = false">保存</el-button> |
| | | <el-button class="btns" size="small" type="primary" @click="applyDelaySave()">保存</el-button> |
| | | <el-button size="small" @click="dialogVisible = false">关闭</el-button> |
| | | </div> |
| | | </el-form> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getPageList} from "@/api/sgyhpczl/hiddenDangerRectification"; |
| | | import {getPageList, uploadFile, saveDelayApply} from "@/api/sgyhpczl/hiddenDangerRectification"; |
| | | import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr} from "@/api/sgyhpczl/initSelect"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | |
| | | dialogVisible: false, |
| | | ruleForm: { |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | value1: '', |
| | | desc: '' |
| | | application_time: "", |
| | | remark: "", |
| | | realFileName: "", |
| | | id: "", |
| | | }, |
| | | rules: {}, |
| | | rules: { |
| | | application_time: [{required: true, message: '申请限改时间不能为空', trigger: 'blur'}], |
| | | }, |
| | | fileList: [], |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | pickerOptions: { //禁用当前日期之前的日期 |
| | | disabledDate(time) { |
| | | //Date.now()是javascript中的内置函数,它返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。 |
| | | return time.getTime() < Date.now() - 8.64e7; |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | mounted(){ |
| | |
| | | this.initYHBM() |
| | | }, |
| | | |
| | | watch: { |
| | | dialogVisible(nval, oval) { |
| | | //弹框关闭,重置值 |
| | | if (!nval) { |
| | | this.fileList = []; |
| | | this.ruleForm = { |
| | | application_time: "", |
| | | remark: "", |
| | | realFileName: "", |
| | | id: "", |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | initLlr(){ |
| | | initLlr().then(res=>{ |
| | |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => {}); |
| | | .catch(_ => { |
| | | }); |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | console.log(file, fileList) |
| | |
| | | return false; |
| | | } |
| | | }, |
| | | applyDelay() { |
| | | var selectDataList = this.$refs.dangerRectificationTable.selection; |
| | | if (selectDataList.length != 1) { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据!' |
| | | }); |
| | | return false; |
| | | } else { |
| | | this.ruleForm.id = selectDataList[0].id; |
| | | console.log(this.ruleForm) |
| | | this.dialogVisible = true; |
| | | } |
| | | }, |
| | | applyDelaySave() { |
| | | this.$refs["ruleForm"].validate((valid) => { |
| | | if (valid) { |
| | | saveDelayApply(this.ruleForm).then(res => { |
| | | this.dialogVisible = false; |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '保存成功!' |
| | | }); |
| | | this.getPageList(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | uploadSectionFile(param) { |
| | | let form = new FormData(); |
| | | var that = this; |
| | | form.append('file', param.file); |
| | | //隐患延期申请附件 |
| | | form.append('type', "0"); |
| | | uploadFile(form).then(res => { |
| | | var data = res.data; |
| | | if (data.ok) { |
| | | var fileName = data.data.fileName[0]; |
| | | if (!fileName.endsWith("a62b")) { |
| | | fileName = fileName + param.file.realFileName; |
| | | } |
| | | that.ruleForm.realFileName = that.ruleForm.realFileName + "," + fileName; |
| | | } |
| | | }).error(res => { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '附件上传失败,请重试!' |
| | | }); |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | justify-content:left; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .inquire .el-form-item{ |
| | | padding: 0 46px; |
| | | } |
| | | |
| | | .title-center{ |
| | | padding: 20px 0; |
| | | } |
| | | |
| | | .btns { |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | |
| | | /deep/ .el-dialog .el-textarea__inner{ |
| | | height: 80px; |
| | | max-height: 80px; |
| | | overflow-y: auto |
| | | } |
| | | |
| | | /deep/.el-dialog .button .el-form-item__content{ |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .textarea{ |
| | | max-height: 70px; |
| | | overflow-y: auto; |