|  |  | <template> | 
|  |  | <el-container> | 
|  |  | <el-main> | 
|  |  | <el-row class="row-bg"> | 
|  |  | <el-col :span="24"> | 
|  |  | <div class="grid-content content">确报航班配置查询</div> | 
|  |  | </el-col> | 
|  |  | </el-row> | 
|  |  | <!--            搜索区域--> | 
|  |  | <el-row> | 
|  |  | <el-form :label-position="labelPosition" :model="queryConfigure" :rules="rules" ref="queryFlight" | 
|  |  | label-width="130px" class="demo-ruleForm"> | 
|  |  | <el-row> | 
|  |  | <el-col :span="4" > | 
|  |  | <el-form-item label="承运人" prop="carrier" label-width="70px"> | 
|  |  | <el-input v-model="queryConfigure.carrier" style="width:120px"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="4" > | 
|  |  | <el-form-item label="航班号" prop="flightno" label-width="70px"> | 
|  |  | <el-input v-model="queryConfigure.flightno" style="width:120px"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="5" > | 
|  |  | <el-button type="primary" icon="el-icon-search" @click="submitForm()">查询</el-button> | 
|  |  | <el-button type="success" icon="el-icon-edit" @click="addForm()">新增</el-button> | 
|  |  |  | 
|  |  | </el-col> | 
|  |  | </el-row> | 
|  |  |  | 
|  |  | </el-form> | 
|  |  | </el-row> | 
|  |  | <!--            表单区域--> | 
|  |  | <el-row> | 
|  |  | <el-table | 
|  |  | :data="tableData" | 
|  |  | border | 
|  |  | v-loading="tableloading"> | 
|  |  | <el-table-column | 
|  |  | prop="carrier" | 
|  |  | label="承运人"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="flightno" | 
|  |  | label="航班号"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="customscode" | 
|  |  | label="申报关区"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="aircraftcode" | 
|  |  | label="航空注册器编号"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="aircrafttype" | 
|  |  | label="航空器备案类型" | 
|  |  | show-overflow-tooltip> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="originstation" | 
|  |  | label="航班起始站"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="destinationstation" | 
|  |  | label="航班目的站"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="configstarttime" | 
|  |  | label="配置生效时间"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="configendtime" | 
|  |  | label="配置生效生效到期日"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | label="配置状态"> | 
|  |  | <template slot-scope="scope"> | 
|  |  | <span v-if="scope.row.configstatus ==='0'">禁用</span> | 
|  |  | <span v-if="scope.row.configstatus ==='1'">生效</span> | 
|  |  | </template> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | label="配置类型"> | 
|  |  | <template slot-scope="scope"> | 
|  |  | <span v-if="scope.row.type ==='2'">入境</span> | 
|  |  | <span v-if="scope.row.type ==='1'">出境</span> | 
|  |  | </template> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="userid" | 
|  |  | label="创建人"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="creatdate" | 
|  |  | label="创建时间"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="updatedate" | 
|  |  | label="配置更新时间"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="entrytime" | 
|  |  | label="入境时间"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="departuretime" | 
|  |  | label="出境时间"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="stayid" | 
|  |  | label="停机位"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="crontask" | 
|  |  | label="定时任务配置时间规则"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="customremark" | 
|  |  | label="海关备注"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | prop="remark" | 
|  |  | label="配置规则备注"> | 
|  |  | </el-table-column> | 
|  |  | <el-table-column | 
|  |  | fixed="right" | 
|  |  | prop="" | 
|  |  | label="报文操作" | 
|  |  | width="280"> | 
|  |  | <template slot-scope="scope"> | 
|  |  | <el-button | 
|  |  | size="mini" | 
|  |  | type="primary" | 
|  |  | @click="handleEdit(scope.$index, scope.row)">编辑</el-button> | 
|  |  | <el-button | 
|  |  | size="mini" | 
|  |  | type="danger" | 
|  |  | @click="handleDel(scope.row)">删除</el-button> | 
|  |  | </template> | 
|  |  | </el-table-column> | 
|  |  | </el-table> | 
|  |  | </el-row> | 
|  |  | <el-row> | 
|  |  | <div class="block"> | 
|  |  | <el-pagination | 
|  |  | @size-change="handleSizeChange" | 
|  |  | @current-change="handleCurrentChange" | 
|  |  | :current-page="pageNum" | 
|  |  | :page-sizes="[10, 20, 30, 40]" | 
|  |  | :page-size="pageSize" | 
|  |  | layout="total, sizes, prev, pager, next, jumper" | 
|  |  | :total="total"> | 
|  |  | </el-pagination> | 
|  |  | </div> | 
|  |  | </el-row> | 
|  |  | <!--            新增编辑弹框--> | 
|  |  | <el-row> | 
|  |  | <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="configure_dialog.addDialog" width="80%" @close="configure_addDialogClosed"> | 
|  |  | <el-form  :model="configure_editForm"  :rules="rules" ref="configure_editForm"> | 
|  |  | <el-row> | 
|  |  | <el-col :span="6"  style="margin-top: 10px"> | 
|  |  | <el-form-item label="承运人" prop="carrier" label-width="130px"> | 
|  |  | <el-input v-model.trim="configure_editForm.carrier" @input="e => configure_editForm.carrier=inputMe(e)" | 
|  |  | maxLength='2'></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6" style="margin-top: 10px"> | 
|  |  | <el-form-item label="航班号" prop="flightno" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.flightno" @input="e => configure_editForm.flightno=inputMe(e)"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  |  | 
|  |  | <el-col :span="6"  style="margin-top: 10px"> | 
|  |  | <el-form-item label="申报关区" prop="customscode" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.customscode" oninput="value=value.replace(/[^\d]/g,'')" | 
|  |  | maxLength='4'></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"  style="margin-top: 10px"> | 
|  |  | <el-form-item label="航空注册器编号" prop="aircraftcode" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.aircraftcode"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  |  | 
|  |  | </el-row> | 
|  |  | <el-row> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="航空器备案类型" prop="aircrafttype" label-width="140px"> | 
|  |  | <el-input v-model="configure_editForm.aircrafttype" | 
|  |  | ></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="航班起始站" prop="originstation" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.originstation" @input="e => configure_editForm.originstation=inputMe(e)" | 
|  |  | maxLength='3'></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="航班目的站" prop="destinationstation" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.destinationstation"  @input="e => configure_editForm.destinationstation=inputMe(e)" | 
|  |  | maxLength='3'></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="配置生效时间" prop="configstarttime" label-width="130px"> | 
|  |  | <el-date-picker | 
|  |  | v-model="configure_editForm.configstarttime" | 
|  |  | type="datetime" | 
|  |  | placeholder="选择日期时间" | 
|  |  | value-format="yyyyMMddhhmmss" | 
|  |  | format="yyyyMMddhhmmss" | 
|  |  | style="width: 100%" | 
|  |  | :picker-options="pickerOptions"> | 
|  |  | </el-date-picker> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="配置生效到期日" prop="configendtime" label-width="140px"> | 
|  |  | <el-date-picker | 
|  |  | v-model="configure_editForm.configendtime" | 
|  |  | type="datetime" | 
|  |  | placeholder="选择日期时间" | 
|  |  | value-format="yyyyMMddhhmmss" | 
|  |  | format="yyyyMMddhhmmss" | 
|  |  | style="width: 100%" | 
|  |  | :picker-options="pickerOptions"> | 
|  |  | </el-date-picker> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="配置状态" prop="configstatus" label-width="130px"> | 
|  |  | <!--                                    <el-input v-model="configure_editForm.configstatus"></el-input>--> | 
|  |  | <el-select v-model="configure_editForm.configstatus" placeholder="请选择" size="mini"> | 
|  |  | <el-option label="0-禁用" value="0"></el-option> | 
|  |  | <el-option label="1-生效" value="1"></el-option> | 
|  |  | </el-select> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="配置类型" prop="type" label-width="130px"> | 
|  |  | <!--                                    <el-input v-model="configure_editForm.type"></el-input>--> | 
|  |  | <el-select v-model="configure_editForm.type" placeholder="请选择" size="mini"> | 
|  |  | <el-option label="2-入境" value="2"></el-option> | 
|  |  | <el-option label="1-出境" value="1"></el-option> | 
|  |  | </el-select> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="创建人" prop="userid" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.userid"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="创建时间" prop="creatdate" label-width="130px"> | 
|  |  | <el-date-picker | 
|  |  | v-model="configure_editForm.creatdate" | 
|  |  | type="datetime" | 
|  |  | placeholder="选择日期时间" | 
|  |  | value-format="yyyyMMddhhmmss" | 
|  |  | format="yyyyMMddhhmmss" | 
|  |  | style="width: 100%" | 
|  |  | :picker-options="pickerOptions"> | 
|  |  | </el-date-picker> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="配置更新时间" prop="updatedate" label-width="130px"> | 
|  |  | <el-date-picker | 
|  |  | v-model="configure_editForm.updatedate" | 
|  |  | type="datetime" | 
|  |  | placeholder="选择日期时间" | 
|  |  | value-format="yyyyMMddhhmmss" | 
|  |  | format="yyyyMMddhhmmss" | 
|  |  | style="width: 100%" | 
|  |  | :picker-options="pickerOptions"> | 
|  |  | </el-date-picker> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="入境时间" prop="entrytime" label-width="130px"> | 
|  |  | <el-date-picker | 
|  |  | v-model="configure_editForm.entrytime" | 
|  |  | type="datetime" | 
|  |  | placeholder="选择日期时间" | 
|  |  | value-format="yyyyMMddhhmmss" | 
|  |  | format="yyyyMMddhhmmss" | 
|  |  | style="width:100%"> | 
|  |  | </el-date-picker> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="出境时间" prop="departuretime" label-width="130px"> | 
|  |  | <el-date-picker | 
|  |  | v-model="configure_editForm.departuretime" | 
|  |  | type="datetime" | 
|  |  | placeholder="选择日期时间" | 
|  |  | value-format="yyyyMMddhhmmss" | 
|  |  | format="yyyyMMddhhmmss" | 
|  |  | style="width:100%"> | 
|  |  | </el-date-picker> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | </el-row> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="停机位" prop="stayid" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.stayid"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="定时任务配置时间规则" prop="crontask" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.crontask"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="海关备注" prop="customremark" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.customremark"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | <el-col :span="6"> | 
|  |  | <el-form-item label="配置规则备注" prop="remark" label-width="130px"> | 
|  |  | <el-input v-model="configure_editForm.remark"></el-input> | 
|  |  | </el-form-item> | 
|  |  | </el-col> | 
|  |  | </el-form> | 
|  |  | <div slot="footer" class="dialog-footer"> | 
|  |  | <el-button @click="configure_dialog.addDialog = false" size="small">取 消</el-button> | 
|  |  | <el-button type="primary" @click="dialogStatus==='create'?configure_add():configure_edit()" size="small">提 交</el-button> | 
|  |  | </div> | 
|  |  | </el-dialog> | 
|  |  | </el-row> | 
|  |  | </el-main> | 
|  |  | </el-container> | 
|  |  | </template> | 
|  |  |  | 
|  |  |  | 
|  |  | <script> | 
|  |  | import {selectExact,ediExact,addExact,delExact} from "../../api/transport"; | 
|  |  |  | 
|  |  | export default { | 
|  |  | data(){ | 
|  |  | return{ | 
|  |  | pickerOptions: { | 
|  |  | shortcuts: [{ | 
|  |  | text: '最近一周', | 
|  |  | onClick(picker) { | 
|  |  | const end = new Date(); | 
|  |  | const start = new Date(); | 
|  |  | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | 
|  |  | picker.$emit('pick', [start, end]); | 
|  |  | } | 
|  |  | }, { | 
|  |  | text: '最近一个月', | 
|  |  | onClick(picker) { | 
|  |  | const end = new Date(); | 
|  |  | const start = new Date(); | 
|  |  | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | 
|  |  | picker.$emit('pick', [start, end]); | 
|  |  | } | 
|  |  | }, { | 
|  |  | text: '最近三个月', | 
|  |  | onClick(picker) { | 
|  |  | const end = new Date(); | 
|  |  | const start = new Date(); | 
|  |  | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | 
|  |  | picker.$emit('pick', [start, end]); | 
|  |  | } | 
|  |  | }] | 
|  |  | }, | 
|  |  | queryConfigure:{ | 
|  |  | flightno:undefined, | 
|  |  | carrier:undefined, | 
|  |  | }, | 
|  |  | labelPosition:'left', | 
|  |  | pageNum: 1, | 
|  |  | pageSize:10, | 
|  |  | total:0, | 
|  |  | tableData:[], | 
|  |  | tableloading:false, | 
|  |  | dialogMap: { | 
|  |  | update: '编辑', | 
|  |  | create: '新增' | 
|  |  | }, | 
|  |  | dialogStatus: 'create', | 
|  |  | configure_dialog: { | 
|  |  | // 添加对话框 | 
|  |  | addDialog: false, | 
|  |  | // 编辑对话框 | 
|  |  | editDialog: false | 
|  |  | }, | 
|  |  | formLabelWidth: '220px', | 
|  |  | configure_editForm: { | 
|  |  | carrier: '', | 
|  |  | flightno: '', | 
|  |  | customscode: '', | 
|  |  | aircraftcode: '', | 
|  |  | aircrafttype: '', | 
|  |  | originstation: '', | 
|  |  | destinationstation: '', | 
|  |  | configstarttime: '', | 
|  |  | configendtime: '', | 
|  |  | configstatus: '', | 
|  |  | type: '', | 
|  |  | userid: '', | 
|  |  | creatdate: '', | 
|  |  | updatedate: '', | 
|  |  | entrytime: '', | 
|  |  | departuretime: '', | 
|  |  | stayid: '', | 
|  |  | crontask: '', | 
|  |  | customremark: '', | 
|  |  | remark: '', | 
|  |  | }, | 
|  |  | rules: { | 
|  |  | carrier: [ | 
|  |  | { required: true, message: '请输入', trigger: 'blur' }, | 
|  |  | // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' } | 
|  |  | ], | 
|  |  | flightno: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | configstarttime: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | configendtime: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | configstatus: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | type: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | creatdate: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | updatedate: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | entrytime: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | departuretime: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | customscode: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | aircraftcode: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | aircrafttype: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | originstation: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | destinationstation: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | userid: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | stayid: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | crontask: [ | 
|  |  | {  required: true, message: '请输入', trigger: 'change' } | 
|  |  | ], | 
|  |  | } | 
|  |  | } | 
|  |  | }, | 
|  |  | methods: { | 
|  |  | //分页 | 
|  |  | handleSizeChange(val) { | 
|  |  | this.pageSize=val; | 
|  |  | this.submitForm(); | 
|  |  | }, | 
|  |  | handleCurrentChange(val) { | 
|  |  | this.pageNum=val; | 
|  |  | this.submitForm(); | 
|  |  | }, | 
|  |  | // 获取消息标签列表 | 
|  |  | submitForm() { | 
|  |  | const _this = this | 
|  |  | selectExact(this.queryConfigure).then((response) => { | 
|  |  | const res = response.data | 
|  |  | console.log(response.data) | 
|  |  | if (res.code !== '200') { | 
|  |  | return _this.$message.error('获取消息收发记录,失败!') | 
|  |  | } | 
|  |  | // 获取列表数据 | 
|  |  | _this.tableData = res.data.list | 
|  |  | // 获取列表的总记录数 | 
|  |  | _this.total = res.data.total | 
|  |  | _this.$message.success('获取消息收发记录,成功!') | 
|  |  | }).catch(error => { | 
|  |  | // 关闭加载 | 
|  |  | _this.$message.error(error.toString()) | 
|  |  | }) | 
|  |  | }, | 
|  |  | //新增编辑弹框关闭重置 | 
|  |  | configure_addDialogClosed() { | 
|  |  | // 重置对话框 | 
|  |  | this.$refs.configure_editForm.resetFields() | 
|  |  | }, | 
|  |  | // 打开新增 | 
|  |  | addForm() { | 
|  |  | this.dialogStatus = 'create' | 
|  |  | this.configure_dialog.addDialog = true | 
|  |  | }, | 
|  |  | // 新增功能 | 
|  |  | configure_add() {     // 进行表单的预验证 | 
|  |  | this.$refs.configure_editForm.validate(valid => { | 
|  |  | // 未通过,表单预校验 | 
|  |  | if (!valid) return | 
|  |  | addExact(this.configure_editForm).then((response) => { | 
|  |  | const res = response.data | 
|  |  | // 添加失败 | 
|  |  | if (res.code !== '200') { | 
|  |  | // 关闭加载 | 
|  |  | return this.$message.error(res.msg) | 
|  |  | } | 
|  |  | // 添加,成功 | 
|  |  | this.$message.success(res.msg) | 
|  |  | // 隐藏对话框 | 
|  |  | this.configure_dialog.addDialog = false | 
|  |  | // 刷新列表 | 
|  |  | this.submitForm() | 
|  |  | }).catch(error => { | 
|  |  | this.$message.error(error.toString()) | 
|  |  | }) | 
|  |  | }) | 
|  |  | }, | 
|  |  | // 打开编辑 | 
|  |  | handleEdit(index, row) { | 
|  |  | this.configure_editForm = Object.assign({}, row) | 
|  |  | this.configure_dialog.addDialog = true | 
|  |  | this.dialogStatus = 'update' | 
|  |  | this.$nextTick(() => { | 
|  |  | this.form = Object.assign({}, row) | 
|  |  | }) | 
|  |  | }, | 
|  |  | // 编辑功能 | 
|  |  | configure_edit() { | 
|  |  | // 进行表单的预验证 | 
|  |  | this.$refs.configure_editForm.validate(valid => { | 
|  |  | // 未通过,表单预校验 | 
|  |  | if (!valid) return | 
|  |  | ediExact(this.configure_editForm).then((response) => { | 
|  |  | const res = response.data | 
|  |  | if (res.code !== '200') { | 
|  |  | return this.$message.error(res.msg) | 
|  |  | } | 
|  |  | this.$message.success(res.msg) | 
|  |  | // 隐藏对话框 | 
|  |  | this.configure_dialog.addDialog = false | 
|  |  | // 刷新列表 | 
|  |  | this.submitForm() | 
|  |  | }).catch(error => { | 
|  |  | this.$message.error(error.toString()) | 
|  |  | }) | 
|  |  | }) | 
|  |  | }, | 
|  |  | // 删除 | 
|  |  | handleDel(row) { | 
|  |  | // 弹框询问是否删除? | 
|  |  | this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | 
|  |  | confirmButtonText: '确定删除', | 
|  |  | cancelButtonText: '取消', | 
|  |  | type: 'warning' | 
|  |  | } | 
|  |  | ).then(() => { | 
|  |  | delExact(row).then((response) => { | 
|  |  | console.log(row) | 
|  |  | const res = response.data | 
|  |  | if (res.code !== '200') { | 
|  |  | return this.$message.error(res.msg) | 
|  |  | } | 
|  |  | this.$message.success(res.msg) | 
|  |  | // 刷新列表 | 
|  |  | this.submitForm() | 
|  |  | }).catch(error => { | 
|  |  | this.$message.error(res.msg) | 
|  |  | }) | 
|  |  | }).catch(() => { | 
|  |  | }) | 
|  |  | }, | 
|  |  | // 过滤中英文 | 
|  |  | inputMe(e){ | 
|  |  | return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase(); | 
|  |  | } | 
|  |  | }, | 
|  |  | //渲染方法 | 
|  |  | mounted(){ | 
|  |  | this.submitForm(); | 
|  |  |  | 
|  |  | } | 
|  |  | } | 
|  |  | </script> | 
|  |  |  | 
|  |  | <style scoped> | 
|  |  |  | 
|  |  | </style> | 
... | ... |  |