Showing
9 changed files
with
169 additions
and
175 deletions
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-dialog title="货物配舱" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" | 3 | + <el-dialog title="货物配舱" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false" |
| 4 | :append-to-body="true"> | 4 | :append-to-body="true"> |
| 5 | <el-divider content-position="left">已选货物信息</el-divider> | 5 | <el-divider content-position="left">已选货物信息</el-divider> |
| 6 | <el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row | 6 | <el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row |
| ... | @@ -148,7 +148,7 @@ export default { | ... | @@ -148,7 +148,7 @@ export default { |
| 148 | }); | 148 | }); |
| 149 | } else { | 149 | } else { |
| 150 | this.loading = false; | 150 | this.loading = false; |
| 151 | - this.msgWarning("航班号或航班日期不能为空") | 151 | + this.msgWarning('航班号或航班日期不能为空') |
| 152 | } | 152 | } |
| 153 | }, | 153 | }, |
| 154 | dialogBeforeClose() { | 154 | dialogBeforeClose() { | ... | ... |
| ... | @@ -16,13 +16,16 @@ | ... | @@ -16,13 +16,16 @@ |
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | <div> | 17 | <div> |
| 18 | <el-button style="margin-bottom: 20px" type="primary" icon="el-icon-plus" size="mini" | 18 | <el-button style="margin-bottom: 20px" type="primary" icon="el-icon-plus" size="mini" |
| 19 | - v-hasPermi="['allocation:alloc:add']" | 19 | + v-hasPermi="['allocation:alloc:add']" @click=" |
| 20 | - @click="$router.push({ name: 'FlightAllocConfigAdd', params: { handle: 'add' } })">添加</el-button> | 20 | + $router.push({ |
| 21 | + name: 'FlightAllocConfigAdd', | ||
| 22 | + params: { handle: 'add' }, | ||
| 23 | + }) | ||
| 24 | + ">添加</el-button> | ||
| 21 | </div> | 25 | </div> |
| 22 | </el-form> | 26 | </el-form> |
| 23 | <el-table :data="flyList" v-loading="loading" size="small" highlight-current-row border stripe> | 27 | <el-table :data="flyList" v-loading="loading" size="small" highlight-current-row border stripe> |
| 24 | <el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column> | 28 | <el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column> |
| 25 | - | ||
| 26 | <el-table-column prop="status" label="状态" align="center"> | 29 | <el-table-column prop="status" label="状态" align="center"> |
| 27 | <template slot-scope="scope"> | 30 | <template slot-scope="scope"> |
| 28 | <span v-if="scope.row.status === '0'">无效</span> | 31 | <span v-if="scope.row.status === '0'">无效</span> |
| ... | @@ -31,21 +34,18 @@ | ... | @@ -31,21 +34,18 @@ |
| 31 | <span v-if="scope.row.status === '3'">停用</span> | 34 | <span v-if="scope.row.status === '3'">停用</span> |
| 32 | </template> | 35 | </template> |
| 33 | </el-table-column> | 36 | </el-table-column> |
| 34 | - | ||
| 35 | <el-table-column prop="createUserName" label="操作人" align="center"> | 37 | <el-table-column prop="createUserName" label="操作人" align="center"> |
| 36 | </el-table-column> | 38 | </el-table-column> |
| 37 | - | ||
| 38 | <el-table-column prop="createTime" label="更新时间" align="center"> | 39 | <el-table-column prop="createTime" label="更新时间" align="center"> |
| 39 | </el-table-column> | 40 | </el-table-column> |
| 40 | - | ||
| 41 | <el-table-column label="操作" prop="id" align="center"> | 41 | <el-table-column label="操作" prop="id" align="center"> |
| 42 | <template slot-scope="scope"> | 42 | <template slot-scope="scope"> |
| 43 | <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看 | 43 | <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看 |
| 44 | </el-button> | 44 | </el-button> |
| 45 | <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" | 45 | <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" |
| 46 | @click="handleClick(scope.row.id, 'update')">修改</el-button> | 46 | @click="handleClick(scope.row.id, 'update')">修改</el-button> |
| 47 | - <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" v-hasPermi="['allocation:alloc:delete']" | 47 | + <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" |
| 48 | - @click="del(scope.row.id, scope.row.status)">删除</el-button> | 48 | + v-hasPermi="['allocation:alloc:delete']" @click="del(scope.row.id, scope.row.status)">删除</el-button> |
| 49 | <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']" | 49 | <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']" |
| 50 | @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button> | 50 | @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button> |
| 51 | <el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']" | 51 | <el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']" |
| ... | @@ -66,6 +66,7 @@ import { | ... | @@ -66,6 +66,7 @@ import { |
| 66 | delFlightId, | 66 | delFlightId, |
| 67 | enableOrDisable, | 67 | enableOrDisable, |
| 68 | } from "@/api/destinationFlight"; | 68 | } from "@/api/destinationFlight"; |
| 69 | + | ||
| 69 | export default { | 70 | export default { |
| 70 | name: "FlightAllocConfig", | 71 | name: "FlightAllocConfig", |
| 71 | data() { | 72 | data() { |
| ... | @@ -105,7 +106,7 @@ export default { | ... | @@ -105,7 +106,7 @@ export default { |
| 105 | this.loading = true; | 106 | this.loading = true; |
| 106 | findFlightNo(this.queryParams).then((response) => { | 107 | findFlightNo(this.queryParams).then((response) => { |
| 107 | if (response.code != 200) { | 108 | if (response.code != 200) { |
| 108 | - this.msgError(response.msg) | 109 | + this.msgWarning(response.msg) |
| 109 | return; | 110 | return; |
| 110 | } | 111 | } |
| 111 | this.flyList = response.data.list; | 112 | this.flyList = response.data.list; |
| ... | @@ -134,15 +135,14 @@ export default { | ... | @@ -134,15 +135,14 @@ export default { |
| 134 | cancelButtonText: "取消", | 135 | cancelButtonText: "取消", |
| 135 | showCancelButton: true, | 136 | showCancelButton: true, |
| 136 | type: "warning", | 137 | type: "warning", |
| 137 | - }) | 138 | + }).then(() => { |
| 138 | - .then(() => { | 139 | + delFlightId(id) |
| 139 | - delFlightId(id) | 140 | + .then((res) => { |
| 140 | - .then((res) => { | 141 | + res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg) |
| 141 | - res.code === 200 ? this.msgSuccess(res.msg) : this.msgWarning(res.msg) | 142 | + this.getList() |
| 142 | - this.getList() | 143 | + }) |
| 143 | - }) | 144 | + .catch(() => { }); |
| 144 | - .catch(() => { }); | 145 | + }); |
| 145 | - }) | ||
| 146 | } | 146 | } |
| 147 | }, | 147 | }, |
| 148 | //启用,停用 | 148 | //启用,停用 |
| ... | @@ -152,9 +152,9 @@ export default { | ... | @@ -152,9 +152,9 @@ export default { |
| 152 | confirmButtonText: "确定", | 152 | confirmButtonText: "确定", |
| 153 | cancelButtonText: "取消", | 153 | cancelButtonText: "取消", |
| 154 | type: "warning", | 154 | type: "warning", |
| 155 | - }) | 155 | + }).then(() => { |
| 156 | - .then(() => { | 156 | + enableOrDisable(id, status) |
| 157 | - enableOrDisable(id, status).then((res) => { | 157 | + .then((res) => { |
| 158 | if (res.code != 200) { | 158 | if (res.code != 200) { |
| 159 | this.msgError(res.msg); | 159 | this.msgError(res.msg); |
| 160 | } else { | 160 | } else { |
| ... | @@ -162,8 +162,8 @@ export default { | ... | @@ -162,8 +162,8 @@ export default { |
| 162 | this.msgSuccess(tip + "成功"); | 162 | this.msgSuccess(tip + "成功"); |
| 163 | } | 163 | } |
| 164 | }) | 164 | }) |
| 165 | - .catch(() => { }); | 165 | + .catch(() => { }); |
| 166 | - }) | 166 | + }); |
| 167 | }, | 167 | }, |
| 168 | }, | 168 | }, |
| 169 | computed: { | 169 | computed: { |
| ... | @@ -172,10 +172,10 @@ export default { | ... | @@ -172,10 +172,10 @@ export default { |
| 172 | return this.queryParams.purposeOfFlightNo; | 172 | return this.queryParams.purposeOfFlightNo; |
| 173 | }, | 173 | }, |
| 174 | set: function (val) { | 174 | set: function (val) { |
| 175 | - this.queryParams.purposeOfFlightNo = this.upCase(val) | 175 | + this.queryParams.purposeOfFlightNo = this.upCase(val); |
| 176 | }, | 176 | }, |
| 177 | }, | 177 | }, |
| 178 | - } | 178 | + }, |
| 179 | }; | 179 | }; |
| 180 | </script> | 180 | </script> |
| 181 | 181 | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" :model="queryParams" ref="queryForm" size="medium" :inline="true" | 3 | + <el-form class="form-header" :model="queryParams" ref="queryForm" size="small" :inline="true" label-position="right" |
| 4 | - label-position="right" label-width="auto"> | 4 | + label-width="auto"> |
| 5 | <el-form-item label="原航班"> | 5 | <el-form-item label="原航班"> |
| 6 | <el-input type="text" v-model="sourceFlightNo" placeholder="请输入原航班" clearable></el-input> | 6 | <el-input type="text" v-model="sourceFlightNo" placeholder="请输入原航班" clearable></el-input> |
| 7 | </el-form-item> | 7 | </el-form-item> |
| ... | @@ -47,8 +47,8 @@ | ... | @@ -47,8 +47,8 @@ |
| 47 | <template slot-scope="scope"> | 47 | <template slot-scope="scope"> |
| 48 | <el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['allocation:rand:update']" | 48 | <el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['allocation:rand:update']" |
| 49 | @click="handleUpdate(scope.row)">修改</el-button> | 49 | @click="handleUpdate(scope.row)">修改</el-button> |
| 50 | - <el-button size="mini" type="text" icon="el-icon-delete" v-hasPermi="['allocation:rand:delete']" | 50 | + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949" |
| 51 | - @click="handleDeleteorPlayorpause(scope.row, 0, '删除')" style="color:#ff4949"> | 51 | + v-hasPermi="['allocation:rand:delete']" @click="handleDeleteorPlayorpause(scope.row, 0, '删除')"> |
| 52 | 删除</el-button> | 52 | 删除</el-button> |
| 53 | <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'" | 53 | <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'" |
| 54 | v-hasPermi="['allocation:rand:openClose']" @click="handleDeleteorPlayorpause(scope.row, 1, '启用')">启用 | 54 | v-hasPermi="['allocation:rand:openClose']" @click="handleDeleteorPlayorpause(scope.row, 1, '启用')">启用 |
| ... | @@ -63,7 +63,7 @@ | ... | @@ -63,7 +63,7 @@ |
| 63 | :page.sync="queryParams.pageNum" :limit.sync="queryParams.limit" @pagination="findSourceFlightRules" /> | 63 | :page.sync="queryParams.pageNum" :limit.sync="queryParams.limit" @pagination="findSourceFlightRules" /> |
| 64 | <!-- 查看目的航班对话框 --> | 64 | <!-- 查看目的航班对话框 --> |
| 65 | <el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" | 65 | <el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" |
| 66 | - :append-to-body="true"> | 66 | + :show-close="false" :append-to-body="true"> |
| 67 | <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> | 67 | <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> |
| 68 | <el-table-column type="index" label="序号" align="center"> | 68 | <el-table-column type="index" label="序号" align="center"> |
| 69 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> | 69 | <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| ... | @@ -83,8 +83,9 @@ | ... | @@ -83,8 +83,9 @@ |
| 83 | </div> | 83 | </div> |
| 84 | </el-dialog> | 84 | </el-dialog> |
| 85 | <!-- 添加或修改对话框 --> | 85 | <!-- 添加或修改对话框 --> |
| 86 | - <el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false"> | 86 | + <el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false" |
| 87 | - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> | 87 | + :show-close="false"> |
| 88 | + <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small"> | ||
| 88 | <el-row> | 89 | <el-row> |
| 89 | <el-col :span="8"> | 90 | <el-col :span="8"> |
| 90 | <el-form-item label="原航班" prop="sourceFlightNo"> | 91 | <el-form-item label="原航班" prop="sourceFlightNo"> |
| ... | @@ -93,7 +94,7 @@ | ... | @@ -93,7 +94,7 @@ |
| 93 | </el-col> | 94 | </el-col> |
| 94 | <el-col :span="8"> | 95 | <el-col :span="8"> |
| 95 | <el-form-item label="口岸" prop="portName"> | 96 | <el-form-item label="口岸" prop="portName"> |
| 96 | - <el-select :disabled="true" v-model="form.portName" size="mini" placeholder="选择口岸"> | 97 | + <el-select :disabled="true" v-model="form.portName" placeholder="选择口岸"> |
| 97 | <el-option v-for="item in portNameList" :label="item" :value="item" :key="item"> | 98 | <el-option v-for="item in portNameList" :label="item" :value="item" :key="item"> |
| 98 | </el-option> | 99 | </el-option> |
| 99 | </el-select> | 100 | </el-select> |
| ... | @@ -103,15 +104,15 @@ | ... | @@ -103,15 +104,15 @@ |
| 103 | <el-row> | 104 | <el-row> |
| 104 | <el-col :span="8"> | 105 | <el-col :span="8"> |
| 105 | <el-form-item label="有效开始时间" prop="startDate"> | 106 | <el-form-item label="有效开始时间" prop="startDate"> |
| 106 | - <el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate" | 107 | + <el-date-picker clearable :picker-options="pickerOptionsStart" v-model="form.startDate" type="date" |
| 107 | - type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间"> | 108 | + value-format="yyyy-MM-dd" placeholder="选择开始时间"> |
| 108 | </el-date-picker> | 109 | </el-date-picker> |
| 109 | </el-form-item> | 110 | </el-form-item> |
| 110 | </el-col> | 111 | </el-col> |
| 111 | <el-col :span="12"> | 112 | <el-col :span="12"> |
| 112 | <el-form-item label="有效结束时间" prop="endDate"> | 113 | <el-form-item label="有效结束时间" prop="endDate"> |
| 113 | - <el-date-picker clearable size="small" :picker-options="pickerOptionsEnd" v-model="form.endDate" | 114 | + <el-date-picker clearable :picker-options="pickerOptionsEnd" v-model="form.endDate" type="date" |
| 114 | - type="date" value-format="yyyy-MM-dd" placeholder="选择结束时间"> | 115 | + value-format="yyyy-MM-dd" placeholder="选择结束时间"> |
| 115 | </el-date-picker> | 116 | </el-date-picker> |
| 116 | </el-form-item> | 117 | </el-form-item> |
| 117 | </el-col> | 118 | </el-col> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium"> | 3 | + <el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="small"> |
| 4 | <el-row> | 4 | <el-row> |
| 5 | <el-col :span="6"> | 5 | <el-col :span="6"> |
| 6 | <el-form-item label="航班日期从" prop="fltDateStart"> | 6 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| ... | @@ -18,27 +18,27 @@ | ... | @@ -18,27 +18,27 @@ |
| 18 | </el-col> | 18 | </el-col> |
| 19 | <el-col :span="6"> | 19 | <el-col :span="6"> |
| 20 | <el-form-item label="航班号"> | 20 | <el-form-item label="航班号"> |
| 21 | - <el-input type="textarea" v-model="fltNo" clearable class="formItem" placeholder="AC001;AC002" :rows="1"> | 21 | + <el-input type="textarea" v-model="fltNo" clearable class="formItem" placeholder="AC001;AC002" rows="1"> |
| 22 | </el-input> | 22 | </el-input> |
| 23 | </el-form-item> | 23 | </el-form-item> |
| 24 | </el-col> | 24 | </el-col> |
| 25 | <el-col :span="6"> | 25 | <el-col :span="6"> |
| 26 | <el-form-item label="运单号"> | 26 | <el-form-item label="运单号"> |
| 27 | <el-input clearable type="textarea" v-model="queryParams.waybillNo" class="formItem" | 27 | <el-input clearable type="textarea" v-model="queryParams.waybillNo" class="formItem" |
| 28 | - placeholder="请输入运单号(回车间隔)" :rows="1"></el-input> | 28 | + placeholder="请输入运单号(回车间隔)" rows="1"></el-input> |
| 29 | </el-form-item> | 29 | </el-form-item> |
| 30 | </el-col> | 30 | </el-col> |
| 31 | </el-row> | 31 | </el-row> |
| 32 | <el-row> | 32 | <el-row> |
| 33 | <el-col :span="6"> | 33 | <el-col :span="6"> |
| 34 | <el-form-item label="站点"> | 34 | <el-form-item label="站点"> |
| 35 | - <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1"> | 35 | + <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable rows="1"> |
| 36 | </el-input> | 36 | </el-input> |
| 37 | </el-form-item> | 37 | </el-form-item> |
| 38 | </el-col> | 38 | </el-col> |
| 39 | <el-col :span="6"> | 39 | <el-col :span="6"> |
| 40 | <el-form-item label="URSA"> | 40 | <el-form-item label="URSA"> |
| 41 | - <el-input clearable type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="1"> | 41 | + <el-input clearable type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" rows="1"> |
| 42 | </el-input> | 42 | </el-input> |
| 43 | </el-form-item> | 43 | </el-form-item> |
| 44 | </el-col> | 44 | </el-col> |
| ... | @@ -53,7 +53,6 @@ | ... | @@ -53,7 +53,6 @@ |
| 53 | }}</el-button> | 53 | }}</el-button> |
| 54 | </div> | 54 | </div> |
| 55 | </el-form> | 55 | </el-form> |
| 56 | - | ||
| 57 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> | 56 | <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> |
| 58 | <el-table-column label="运单号" align="center" prop="waybillNo" /> | 57 | <el-table-column label="运单号" align="center" prop="waybillNo" /> |
| 59 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> | 58 | <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> | ... | ... |
| ... | @@ -15,7 +15,8 @@ | ... | @@ -15,7 +15,8 @@ |
| 15 | <div style="font-size: 12px; font-weight: 700"> | 15 | <div style="font-size: 12px; font-weight: 700"> |
| 16 | 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> | 16 | 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> |
| 17 | </div> | 17 | </div> |
| 18 | - <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border> | 18 | + <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" |
| 19 | + border> | ||
| 19 | <el-table-column label="行号" prop="line" width="50" align="center"> | 20 | <el-table-column label="行号" prop="line" width="50" align="center"> |
| 20 | </el-table-column> | 21 | </el-table-column> |
| 21 | <el-table-column label="错误信息" prop="errorMessage" width="300"> | 22 | <el-table-column label="错误信息" prop="errorMessage" width="300"> |
| ... | @@ -31,99 +32,99 @@ | ... | @@ -31,99 +32,99 @@ |
| 31 | <el-table-column v-if="tableData.length > 0" label="航班日期" align="center" prop="C" /> | 32 | <el-table-column v-if="tableData.length > 0" label="航班日期" align="center" prop="C" /> |
| 32 | <el-table-column v-if="tableData.length > 0" label="航班号" align="center" prop="D" /> | 33 | <el-table-column v-if="tableData.length > 0" label="航班号" align="center" prop="D" /> |
| 33 | <el-table-column v-if="tableData.length > 0" label="预审意见" align="center" prop="E" /> | 34 | <el-table-column v-if="tableData.length > 0" label="预审意见" align="center" prop="E" /> |
| 34 | - <!-- <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" | 35 | + <!-- <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" |
| 35 | v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key" width="120"></el-table-column>--> | 36 | v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key" width="120"></el-table-column>--> |
| 36 | </el-table> | 37 | </el-table> |
| 37 | </div> | 38 | </div> |
| 38 | </template> | 39 | </template> |
| 39 | 40 | ||
| 40 | <script> | 41 | <script> |
| 41 | - import { | 42 | +import { |
| 42 | - downLoadTemplate, | 43 | + downLoadTemplate, |
| 43 | - importcaPreReview, | 44 | + importcaPreReview, |
| 44 | - } from "@/api/caPreReviewImport"; | 45 | +} from "@/api/caPreReviewImport"; |
| 45 | - export default { | 46 | +export default { |
| 46 | - name:"CAPreReviewImport", | 47 | + name: "CAPreReviewImport", |
| 47 | - data() { | 48 | + data() { |
| 48 | - return { | 49 | + return { |
| 49 | - // 遮罩层 | 50 | + // 遮罩层 |
| 50 | - loading: false, | 51 | + loading: false, |
| 51 | - flightType: [], | 52 | + flightType: [], |
| 52 | - form: { | 53 | + form: { |
| 53 | - type: "", | 54 | + type: "", |
| 54 | - region: "", | 55 | + region: "", |
| 55 | - }, | ||
| 56 | - fileList: [], | ||
| 57 | - tableData: [], | ||
| 58 | - }; | ||
| 59 | - }, | ||
| 60 | - methods: { | ||
| 61 | - downloadTempleate() { | ||
| 62 | - let fileName = "航班预审导入模板.xlsx"; | ||
| 63 | - downLoadTemplate().then((res) => { | ||
| 64 | - if (res) { | ||
| 65 | - const blob = new Blob([res]); | ||
| 66 | - const link = document.createElement("a"); //创建a标签 | ||
| 67 | - link.download = fileName; //a标签添加属性 | ||
| 68 | - link.style.display = "none"; | ||
| 69 | - link.href = URL.createObjectURL(blob); | ||
| 70 | - document.body.appendChild(link); | ||
| 71 | - link.click(); //执行下载 | ||
| 72 | - URL.revokeObjectURL(link.href); //释放url | ||
| 73 | - document.body.removeChild(link); //释放标签 | ||
| 74 | - } else { | ||
| 75 | - this.$message.error("下载失败"); | ||
| 76 | - } | ||
| 77 | - }); | ||
| 78 | - | ||
| 79 | }, | 56 | }, |
| 80 | - uploadExcel(option) { | 57 | + fileList: [], |
| 81 | - //上传excel | 58 | + tableData: [], |
| 82 | - const file = option.file; | 59 | + }; |
| 83 | - this.loading=true; | 60 | + }, |
| 84 | - importcaPreReview(file, this.form.type).then((res) => { | 61 | + methods: { |
| 85 | - this.loading=false; | 62 | + downloadTempleate() { |
| 86 | - if (res.code != 200) { | 63 | + let fileName = "航班预审导入模板.xlsx"; |
| 87 | - if (res.code == 603) { | 64 | + downLoadTemplate().then((res) => { |
| 88 | - this.$alert(res.msg, "提示", { | 65 | + if (res) { |
| 89 | - confirmButtonText: "确定", | 66 | + const blob = new Blob([res]); |
| 90 | - type: "warning", | 67 | + const link = document.createElement("a"); //创建a标签 |
| 91 | - }); | 68 | + link.download = fileName; //a标签添加属性 |
| 92 | - } else { | 69 | + link.style.display = "none"; |
| 93 | - this.$message.error(res.msg); | 70 | + link.href = URL.createObjectURL(blob); |
| 94 | - this.tableData = res.data; | 71 | + document.body.appendChild(link); |
| 95 | - } | 72 | + link.click(); //执行下载 |
| 73 | + URL.revokeObjectURL(link.href); //释放url | ||
| 74 | + document.body.removeChild(link); //释放标签 | ||
| 75 | + } else { | ||
| 76 | + this.$message.error("下载失败"); | ||
| 77 | + } | ||
| 78 | + }); | ||
| 79 | + | ||
| 80 | + }, | ||
| 81 | + uploadExcel(option) { | ||
| 82 | + //上传excel | ||
| 83 | + const file = option.file; | ||
| 84 | + this.loading = true; | ||
| 85 | + importcaPreReview(file, this.form.type).then((res) => { | ||
| 86 | + this.loading = false; | ||
| 87 | + if (res.code != 200) { | ||
| 88 | + if (res.code == 603) { | ||
| 89 | + this.$alert(res.msg, "提示", { | ||
| 90 | + confirmButtonText: "确定", | ||
| 91 | + type: "warning", | ||
| 92 | + }); | ||
| 96 | } else { | 93 | } else { |
| 97 | - this.$message.success(res.msg); | 94 | + this.$message.warning(res.msg); |
| 98 | this.tableData = res.data; | 95 | this.tableData = res.data; |
| 99 | } | 96 | } |
| 100 | - }); | 97 | + } else { |
| 101 | - }, | 98 | + this.$message.success(res.msg); |
| 102 | - handleRemove(file, fileList) { | 99 | + this.tableData = res.data; |
| 103 | - //清掉上传的文件 | 100 | + } |
| 104 | - this.tableData = []; | 101 | + }); |
| 105 | - this.fileList = []; | 102 | + }, |
| 106 | - }, | 103 | + handleRemove(file, fileList) { |
| 107 | - handleExceed(files) { | 104 | + //清掉上传的文件 |
| 108 | - //重复上传文件 | 105 | + this.tableData = []; |
| 109 | - let file = {}; | 106 | + this.fileList = []; |
| 110 | - file.file = files[0]; | 107 | + }, |
| 111 | - file.name = files[0].name; | 108 | + handleExceed(files) { |
| 112 | - this.fileList = []; | 109 | + //重复上传文件 |
| 113 | - this.fileList.push(file); | 110 | + let file = {}; |
| 114 | - this.uploadExcel(file); | 111 | + file.file = files[0]; |
| 115 | - }, | 112 | + file.name = files[0].name; |
| 113 | + this.fileList = []; | ||
| 114 | + this.fileList.push(file); | ||
| 115 | + this.uploadExcel(file); | ||
| 116 | }, | 116 | }, |
| 117 | - }; | 117 | + }, |
| 118 | +}; | ||
| 118 | </script> | 119 | </script> |
| 119 | <style rel="stylesheet/scss" lang="scss"> | 120 | <style rel="stylesheet/scss" lang="scss"> |
| 120 | - .upload-demo { | 121 | +.upload-demo { |
| 121 | - float: right; | 122 | + float: right; |
| 122 | - } | 123 | +} |
| 123 | 124 | ||
| 124 | - .el-upload-list { | 125 | +.el-upload-list { |
| 125 | - display: inline-block; | 126 | + display: inline-block; |
| 126 | - margin-left: 10px; | 127 | + margin-left: 10px; |
| 127 | - vertical-align: top; | 128 | + vertical-align: top; |
| 128 | - } | 129 | +} |
| 129 | </style> | 130 | </style> | ... | ... |
| ... | @@ -60,6 +60,15 @@ export default { | ... | @@ -60,6 +60,15 @@ export default { |
| 60 | }; | 60 | }; |
| 61 | }, | 61 | }, |
| 62 | methods: { | 62 | methods: { |
| 63 | + typeData() { | ||
| 64 | + filghtKindData().then((response) => { | ||
| 65 | + if (response.code != 200) { | ||
| 66 | + this.msgError(response.msg) | ||
| 67 | + } | ||
| 68 | + this.flightType = response.data; | ||
| 69 | + this.form.type = response.data[0].code; | ||
| 70 | + }); | ||
| 71 | + }, | ||
| 63 | downloadTempleate() { | 72 | downloadTempleate() { |
| 64 | let downloadType = ""; | 73 | let downloadType = ""; |
| 65 | let fileName = ""; | 74 | let fileName = ""; |
| ... | @@ -108,7 +117,7 @@ export default { | ... | @@ -108,7 +117,7 @@ export default { |
| 108 | type: "warning", | 117 | type: "warning", |
| 109 | }); | 118 | }); |
| 110 | } else { | 119 | } else { |
| 111 | - this.$message.error(res.msg); | 120 | + this.$message.warning(res.msg); |
| 112 | this.tableData = res.data; | 121 | this.tableData = res.data; |
| 113 | } | 122 | } |
| 114 | } else { | 123 | } else { |
| ... | @@ -133,14 +142,11 @@ export default { | ... | @@ -133,14 +142,11 @@ export default { |
| 133 | }, | 142 | }, |
| 134 | }, | 143 | }, |
| 135 | created() { | 144 | created() { |
| 136 | - filghtKindData().then((response) => { | 145 | + this.typeData() |
| 137 | - if (response.code != 200) { | ||
| 138 | - this.msgError(response.msg) | ||
| 139 | - } | ||
| 140 | - this.flightType = response.data; | ||
| 141 | - this.form.type = response.data[0].code; | ||
| 142 | - }); | ||
| 143 | }, | 146 | }, |
| 147 | + activated() { | ||
| 148 | + this.typeData() | ||
| 149 | + } | ||
| 144 | }; | 150 | }; |
| 145 | </script> | 151 | </script> |
| 146 | <style rel="stylesheet/scss" lang="scss"> | 152 | <style rel="stylesheet/scss" lang="scss"> | ... | ... |
| ... | @@ -299,17 +299,17 @@ export default { | ... | @@ -299,17 +299,17 @@ export default { |
| 299 | trigger: "blur", | 299 | trigger: "blur", |
| 300 | }, | 300 | }, |
| 301 | ], | 301 | ], |
| 302 | - route: [ | 302 | + // route: [ |
| 303 | - { | 303 | + // { |
| 304 | - required: true, | 304 | + // required: true, |
| 305 | - message: "航班线路不能为空", | 305 | + // message: "航班线路不能为空", |
| 306 | - trigger: "blur", | 306 | + // trigger: "blur", |
| 307 | - }, | 307 | + // }, |
| 308 | - { | 308 | + // { |
| 309 | - pattern: /^([A-Z]{3,4})(\-[A-Z]{3,4})+$/, | 309 | + // pattern: /^([A-Z]{3,4})(\-[A-Z]{3,4})+$/, |
| 310 | - message: "请输入正确得航班线路" | 310 | + // message: "请输入正确得航班线路" |
| 311 | - } | 311 | + // } |
| 312 | - ] | 312 | + // ] |
| 313 | }, | 313 | }, |
| 314 | //原航班规则数据 | 314 | //原航班规则数据 |
| 315 | findAllFltDatList: [], | 315 | findAllFltDatList: [], | ... | ... |
| ... | @@ -18,18 +18,6 @@ | ... | @@ -18,18 +18,6 @@ |
| 18 | <div v-else>{{ roleData.remark }}</div> | 18 | <div v-else>{{ roleData.remark }}</div> |
| 19 | </el-form-item> | 19 | </el-form-item> |
| 20 | </el-col> | 20 | </el-col> |
| 21 | - <!-- <el-col :span="24"> | ||
| 22 | - <el-form-item label="角色状态:" prop="valid"> | ||
| 23 | - <el-switch | ||
| 24 | - v-model="roleForm.valid" | ||
| 25 | - :active-value="1" | ||
| 26 | - :inactive-value="2" | ||
| 27 | - active-color="#13ce66" | ||
| 28 | - inactive-color="#ff4949" | ||
| 29 | - :disabled="roleFormDisabled" | ||
| 30 | - ></el-switch> | ||
| 31 | - </el-form-item> | ||
| 32 | - </el-col> --> | ||
| 33 | <el-col :span="24"> | 21 | <el-col :span="24"> |
| 34 | <el-form-item label="角色权限:" prop="menuIdList"> | 22 | <el-form-item label="角色权限:" prop="menuIdList"> |
| 35 | <el-tree ref="tree" :data="treeData" node-key="id" :props="defaultProps" :show-checkbox="true" | 23 | <el-tree ref="tree" :data="treeData" node-key="id" :props="defaultProps" :show-checkbox="true" |
| ... | @@ -91,26 +79,13 @@ export default { | ... | @@ -91,26 +79,13 @@ export default { |
| 91 | }, | 79 | }, |
| 92 | }; | 80 | }; |
| 93 | }, | 81 | }, |
| 94 | - created() { | ||
| 95 | - //权限列表 | ||
| 96 | - getAllAuth() | ||
| 97 | - .then((res) => { | ||
| 98 | - if (res.code === 200) { | ||
| 99 | - this.treeData = this.treeDataInfo(res.data); | ||
| 100 | - } else { | ||
| 101 | - this.msgWarning(res.msg) | ||
| 102 | - } | ||
| 103 | - }) | ||
| 104 | - .catch((err) => { | ||
| 105 | - console.log(err); | ||
| 106 | - }); | ||
| 107 | - }, | ||
| 108 | watch: { | 82 | watch: { |
| 109 | roleFormDisabled() { | 83 | roleFormDisabled() { |
| 110 | this.treeData = this.treeDisabled(this.treeData); | 84 | this.treeData = this.treeDisabled(this.treeData); |
| 111 | }, | 85 | }, |
| 112 | drawer(val, oldVal) { | 86 | drawer(val, oldVal) { |
| 113 | if (val) { | 87 | if (val) { |
| 88 | + this.allAuth() | ||
| 114 | this.roleForm = this.roleData; | 89 | this.roleForm = this.roleData; |
| 115 | } else { | 90 | } else { |
| 116 | this.loading = false; | 91 | this.loading = false; |
| ... | @@ -118,12 +93,25 @@ export default { | ... | @@ -118,12 +93,25 @@ export default { |
| 118 | }, | 93 | }, |
| 119 | }, | 94 | }, |
| 120 | methods: { | 95 | methods: { |
| 96 | + //权限列表 | ||
| 97 | + allAuth() { | ||
| 98 | + getAllAuth() | ||
| 99 | + .then((res) => { | ||
| 100 | + if (res.code === 200) { | ||
| 101 | + this.treeData = this.treeDataInfo(res.data); | ||
| 102 | + } else { | ||
| 103 | + this.msgWarning(res.msg) | ||
| 104 | + } | ||
| 105 | + }) | ||
| 106 | + .catch((err) => { | ||
| 107 | + console.log(err); | ||
| 108 | + }); | ||
| 109 | + }, | ||
| 121 | //关闭 | 110 | //关闭 |
| 122 | handleClose() { | 111 | handleClose() { |
| 123 | this.$refs["roleForm"].clearValidate(); | 112 | this.$refs["roleForm"].clearValidate(); |
| 124 | this.$emit("handleClose", false); | 113 | this.$emit("handleClose", false); |
| 125 | }, | 114 | }, |
| 126 | - | ||
| 127 | //提交 | 115 | //提交 |
| 128 | submit() { | 116 | submit() { |
| 129 | let formData = {}; | 117 | let formData = {}; |
| ... | @@ -151,7 +139,6 @@ export default { | ... | @@ -151,7 +139,6 @@ export default { |
| 151 | console.log(err); | 139 | console.log(err); |
| 152 | }); | 140 | }); |
| 153 | }, | 141 | }, |
| 154 | - | ||
| 155 | //权限结构禁用 | 142 | //权限结构禁用 |
| 156 | treeDisabled(val) { | 143 | treeDisabled(val) { |
| 157 | let data = []; | 144 | let data = []; |
| ... | @@ -164,7 +151,7 @@ export default { | ... | @@ -164,7 +151,7 @@ export default { |
| 164 | }); | 151 | }); |
| 165 | return data; | 152 | return data; |
| 166 | }, | 153 | }, |
| 167 | - | 154 | + //权限结构数据整理 |
| 168 | treeDataInfo(val) { | 155 | treeDataInfo(val) { |
| 169 | let data = []; | 156 | let data = []; |
| 170 | val.forEach((item) => { | 157 | val.forEach((item) => { | ... | ... |
-
Please register or login to post a comment