jinhui.wang

页面状态更新样式修改

...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 > 35 >
36 <div class="userName-wrapper"> 36 <div class="userName-wrapper">
37 <!-- <img :src="avatar" class="user-avatar" /> --> 37 <!-- <img :src="avatar" class="user-avatar" /> -->
38 - <span>欢迎!{{userName}}</span> 38 + <span><i class="el-icon-user-solid" style="color:#1890ff"></i>欢迎!{{userName}}</span>
39 </div> 39 </div>
40 <el-dropdown-menu slot="dropdown"> 40 <el-dropdown-menu slot="dropdown">
41 <el-dropdown-item @click.native="logout"> 41 <el-dropdown-item @click.native="logout">
...@@ -212,6 +212,14 @@ export default { ...@@ -212,6 +212,14 @@ export default {
212 .avatar-container { 212 .avatar-container {
213 text-align: center; 213 text-align: center;
214 margin-right: 15px; 214 margin-right: 15px;
215 + font-weight: 700;
216 + i{
217 + display: inline-block;
218 + height: 50px;
219 + margin-right:5px;
220 + font-size: 24px;
221 + line-height: 50px;
222 + }
215 .userName-wrapper { 223 .userName-wrapper {
216 position: relative; 224 position: relative;
217 font-size:14px; 225 font-size:14px;
......
...@@ -847,12 +847,16 @@ export default { ...@@ -847,12 +847,16 @@ export default {
847 }, 847 },
848 created() { 848 created() {
849 this.seleData(); 849 this.seleData();
850 + if(this.$store.state.tagsView.cachedViews.length == 0){
850 this.select(); 851 this.select();
852 + }
853 + },
854 + activated(){
855 + this.select();
856 + },
857 + deactivated(){
858 + this.tableData = []
851 }, 859 },
852 - // activated(){
853 - // this.seleData();
854 - // this.select();
855 - // },
856 mounted() { 860 mounted() {
857 window.addEventListener("keydown", (code) => { 861 window.addEventListener("keydown", (code) => {
858 if (code.keyCode === 16 && code.shiftKey) { 862 if (code.keyCode === 16 && code.shiftKey) {
......
...@@ -152,9 +152,17 @@ export default { ...@@ -152,9 +152,17 @@ export default {
152 loading: false, 152 loading: false,
153 }; 153 };
154 }, 154 },
155 + created() {
156 + if(this.$store.state.tagsView.cachedViews.length == 0){
157 + this.getList();
158 + }
159 + },
155 activated(){ 160 activated(){
156 this.getList() 161 this.getList()
157 }, 162 },
163 + deactivated(){
164 + this.flyList = []
165 + },
158 methods: { 166 methods: {
159 getList() { 167 getList() {
160 this.queryParams.limit = this.limit; 168 this.queryParams.limit = this.limit;
......
...@@ -443,15 +443,16 @@ export default { ...@@ -443,15 +443,16 @@ export default {
443 }, 443 },
444 created() { 444 created() {
445 this.queryParams.portName = this.$store.state.user.activePortName; 445 this.queryParams.portName = this.$store.state.user.activePortName;
446 - this.findSourceFlightRules();
447 this.portNameList = this.$store.state.user.portNames; 446 this.portNameList = this.$store.state.user.portNames;
448 - this.form.portName = this.$store.state.user.activePortName; 447 + if(this.$store.state.tagsView.cachedViews.length == 0){
448 + this.findSourceFlightRules();
449 + }
449 }, 450 },
450 activated(){ 451 activated(){
451 - this.queryParams.portName = this.$store.state.user.activePortName;
452 this.findSourceFlightRules(); 452 this.findSourceFlightRules();
453 - this.portNameList = this.$store.state.user.portNames; 453 + },
454 - this.form.portName = this.$store.state.user.activePortName; 454 + deactivated(){
455 + this.sourceFlightRulesList = []
455 }, 456 },
456 watch:{ 457 watch:{
457 open(val,oldVal){ 458 open(val,oldVal){
...@@ -499,7 +500,7 @@ export default { ...@@ -499,7 +500,7 @@ export default {
499 this.title = "添加原航班顺位规则"; 500 this.title = "添加原航班顺位规则";
500 this.form.id = -1; 501 this.form.id = -1;
501 this.dayOfWeek = []; 502 this.dayOfWeek = [];
502 - // this.form.portName = this.$store.state.user.activePortName; 503 + this.form.portName = this.$store.state.user.activePortName;
503 }, 504 },
504 /** 修改按钮操作 */ 505 /** 修改按钮操作 */
505 handleUpdate(row) { 506 handleUpdate(row) {
......
...@@ -116,9 +116,6 @@ ...@@ -116,9 +116,6 @@
116 this.uploadExcel(file); 116 this.uploadExcel(file);
117 }, 117 },
118 }, 118 },
119 - created() {
120 -
121 - },
122 }; 119 };
123 </script> 120 </script>
124 <style rel="stylesheet/scss" lang="scss"> 121 <style rel="stylesheet/scss" lang="scss">
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium"> 3 + <el-form
4 + class="form-header"
5 + :model="queryParams"
6 + ref="queryForm"
7 + label-position="right"
8 + label-width="auto"
9 + size="medium"
10 + >
4 <el-row> 11 <el-row>
5 <el-col :span="6"> 12 <el-col :span="6">
6 <el-form-item label="航班日期从" prop="fltDateStart"> 13 <el-form-item label="航班日期从" prop="fltDateStart">
7 - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" placeholder="选择日期"> 14 + <el-date-picker
15 + class="formItem"
16 + value-format="yyyy-MM-dd"
17 + v-model="queryParams.fltDateStart"
18 + type="date"
19 + placeholder="选择日期"
20 + >
8 </el-date-picker> 21 </el-date-picker>
9 </el-form-item> 22 </el-form-item>
10 </el-col> 23 </el-col>
11 -
12 <el-col :span="6"> 24 <el-col :span="6">
13 <el-form-item label="到" prop="fltDateEnd"> 25 <el-form-item label="到" prop="fltDateEnd">
14 - <el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" placeholder="选择日期"> 26 + <el-date-picker
27 + class="formItem"
28 + value-format="yyyy-MM-dd"
29 + v-model="queryParams.fltDateEnd"
30 + type="date"
31 + placeholder="选择日期"
32 + >
15 </el-date-picker> 33 </el-date-picker>
16 </el-form-item> 34 </el-form-item>
17 </el-col> 35 </el-col>
18 -
19 <el-col :span="6"> 36 <el-col :span="6">
20 <el-form-item label="航班号" prop="fltNo"> 37 <el-form-item label="航班号" prop="fltNo">
21 - <el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable /> 38 + <el-input
39 + class="formItem"
40 + v-model="queryParams.fltNo"
41 + placeholder="请输入航班号"
42 + clearable
43 + />
22 </el-form-item> 44 </el-form-item>
23 </el-col> 45 </el-col>
24 -
25 <el-col :span="6"> 46 <el-col :span="6">
26 <el-form-item label="航班类型" prop="typeId"> 47 <el-form-item label="航班类型" prop="typeId">
27 - <el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable> 48 + <el-select
28 - <el-option v-for="dict in flightTypelist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> 49 + class="formItem"
50 + v-model="queryParams.typeId"
51 + placeholder="请选择航班类型"
52 + clearable
53 + >
54 + <el-option
55 + v-for="dict in selectOption.flightTypelist"
56 + :key="dict.id"
57 + :label="dict.chineseName"
58 + :value="dict.id"
59 + />
29 </el-select> 60 </el-select>
30 </el-form-item> 61 </el-form-item>
31 </el-col> 62 </el-col>
32 -
33 <el-col :span="6"> 63 <el-col :span="6">
34 <el-form-item label="航班状态" prop="statusId"> 64 <el-form-item label="航班状态" prop="statusId">
35 - <el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable> 65 + <el-select
36 - <el-option v-for="dict in flightStatuslist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> 66 + class="formItem"
67 + v-model="queryParams.statusId"
68 + placeholder="请选择航班状态"
69 + clearable
70 + >
71 + <el-option
72 + v-for="dict in selectOption.flightStatuslist"
73 + :key="dict.id"
74 + :label="dict.chineseName"
75 + :value="dict.id"
76 + />
37 </el-select> 77 </el-select>
38 </el-form-item> 78 </el-form-item>
39 </el-col> 79 </el-col>
40 -
41 <el-col :span="6"> 80 <el-col :span="6">
42 <el-form-item label="航班种类" prop="flightKindId"> 81 <el-form-item label="航班种类" prop="flightKindId">
43 - <el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable> 82 + <el-select
44 - <el-option v-for="dict in flightKindlist" :key="dict.id" :label="dict.chineseName" :value="dict.id" /> 83 + class="formItem"
84 + v-model="queryParams.flightKindId"
85 + placeholder="请选择航班种类"
86 + clearable
87 + >
88 + <el-option
89 + v-for="dict in selectOption.flightKindlist"
90 + :key="dict.id"
91 + :label="dict.chineseName"
92 + :value="dict.id"
93 + />
45 </el-select> 94 </el-select>
46 </el-form-item> 95 </el-form-item>
47 </el-col> 96 </el-col>
48 -
49 </el-row> 97 </el-row>
50 - 98 + <el-button
51 - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 99 + type="primary"
52 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 100 + icon="el-icon-search"
53 - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['base:flightInfo:add']">新增</el-button> 101 + size="mini"
54 - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除 102 + @click="handleQuery"
103 + >搜索</el-button
104 + >
105 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
106 + >重置</el-button
107 + >
108 + <el-button
109 + type="primary"
110 + icon="el-icon-plus"
111 + size="mini"
112 + @click="handleAdd"
113 + v-hasPermi="['base:flightInfo:add']"
114 + >新增</el-button
115 + >
116 + <el-button
117 + type="danger"
118 + icon="el-icon-delete"
119 + size="mini"
120 + :disabled="multiple"
121 + @click="handleDelete"
122 + v-hasPermi="['base:flightInfo:delete']"
123 + >删除
55 </el-button> 124 </el-button>
56 - <el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button> 125 + <el-button
57 - <el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button> 126 + type="primary"
58 - 127 + icon="el-icon-circle-check"
128 + size="mini"
129 + @click="handleFlightStatus('flightStatus10')"
130 + v-hasPermi="['base:flightInfo:open']"
131 + >自动配舱开启</el-button
132 + >
133 + <el-button
134 + type="primary"
135 + icon="el-icon-circle-close"
136 + size="mini"
137 + @click="handleFlightStatus('flightStatus80')"
138 + v-hasPermi="['base:flightInfo:close']"
139 + >自动配舱关闭</el-button
140 + >
141 + <!-- <el-button type="primary" icon="el-icon-circle-check" size="mini">自动推送开启</el-button>
142 + <el-button type="primary" icon="el-icon-circle-close" size="mini">自动推送关闭</el-button> -->
59 </el-form> 143 </el-form>
60 - <!-- <el-row :gutter="10" class="mb8"> 144 + <Tables
61 - <el-col :span="1.5"> 145 + ref="flightInfoTable"
62 - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> 146 + :data="findAllFltDatList"
63 - </el-col> 147 + :headerData="tableHeader"
64 - <el-col :span="1.5"> 148 + :infoData="tableHeader"
65 - <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate">修改 149 + :totalCount="total"
66 - </el-button> 150 + :loading="loading"
67 - </el-col> 151 + :limitSize="queryParams.limitSize"
68 - <el-col :span="1.5"> 152 + :page="queryParams.pageNum"
69 - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple">删除 153 + :shiftKey="shiftKey"
70 - </el-button> 154 + :infoShow="false"
71 - </el-col> 155 + :height="tableHeight"
72 - </el-row> --> 156 + @tableSelect="tableSelect"
73 - <el-table height="550" highlight-current-row border stripe v-loading="loading" :data="findAllFltDatList" size="mini" 157 + @tableSelectAll="tableSelectAll"
74 - @selection-change="handleSelectionChange"> 158 + @currentChange="currentChange"
75 - <el-table-column type="selection" width="55" align="center" /> 159 + @sortChange="sortChange"
76 - <el-table-column label="航班日期" align="center" prop="fltDate" width="120" /> 160 + @sizeChange="sizeChange"
77 - <el-table-column label="航班起飞时间" align="center" prop="takeOffTime" width="120" /> 161 + >
78 - <el-table-column label="航班号" align="center" prop="fltNo" width="150"/> 162 + <template>
79 - <el-table-column label="航班路线" align="center" prop="route" width="150" /> 163 + <el-table-column
80 - <el-table-column label="航班类型" align="center" prop="typeName" width="100" /> 164 + v-if="findAllFltDatList.length > 0"
81 - <el-table-column label="航班种类" align="center" prop="flightKindName" width="130" /> 165 + label="操作"
82 - <el-table-column label="航班状态" align="center" prop="statusName" /> 166 + align="center"
83 - <el-table-column label="总重量" align="center" prop="totalWeight" width="130" /> 167 + class-name="small-padding fixed-width"
84 - <el-table-column label="原始重量(KG)" align="center" prop="originalWeight" width="130" /> 168 + fixed="right"
85 - <el-table-column label="总体积(cm³)" align="center" prop="totalVolume" width="130" /> 169 + >
86 - <el-table-column label="是否限制一票一件" align="center" prop="ticketToPiece" width="150"
87 - :formatter="ticketToPieceFormat" />
88 - <el-table-column label="是否需要预审" align="center" prop="needRequired" width="150" :formatter="needRequiredFormat" />
89 - <el-table-column label="额外增重百分比" align="center" prop="extraWeightPercent" width="150" />
90 - <el-table-column label="高价百分比" align="center" prop="highPriceWeightPercent" width="150" />
91 - <el-table-column label="低价百分比" align="center" prop="lowPriceWeightPercent" width="150" />
92 - <el-table-column label="是否开启高地价" align="center" prop="highLowPriceFlg" width="150"
93 - :formatter="highLowPriceFlgFormat" />
94 - <el-table-column label="已配重量" align="center" prop="alloctedWeight" width="150" />
95 - <el-table-column label="已配体积(cm³)" align="center" prop="alloctedVolume" width="150" />
96 - <el-table-column label="航班优先级" align="center" prop="priorityName" width="150" />
97 - <el-table-column label="配舱优先级" align="center" prop="priorityRuleName" width="150" />
98 - <el-table-column label="创建人" align="center" prop="createUserName" width="120" />
99 - <el-table-column label="创建时间" align="center" prop="createTime" width="155" />
100 -
101 - <!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155">
102 <template slot-scope="scope"> 170 <template slot-scope="scope">
103 - <span>{{ renderTime(scope.row.createTime) }}</span> 171 + <el-button
104 - </template> 172 + size="mini"
105 - </el-table-column> --> 173 + type="text"
106 - <el-table-column label="最后修改人" align="center" prop="lastModifyUserName" width="155" /> 174 + icon="el-icon-edit"
107 - <!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155"> 175 + @click="handleUpdate(scope.row)"
108 - <template slot-scope="scope"> 176 + v-hasPermi="['base:flightInfo:update']"
109 - <span>{{ renderTime(scope.row.lastModifyTime) }}</span> 177 + >修改</el-button
110 - </template> 178 + >
111 - </el-table-column> -->
112 - <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="120" />
113 -
114 - <el-table-column v-if="findAllFltDatList.length>0" label="操作" align="center"
115 - class-name="small-padding fixed-width" width="130" fixed="right" style="top:0!important">
116 - <template slot-scope="scope">
117 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['base:flightInfo:update']">修改</el-button>
118 - <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')">
119 - 删除</el-button> -->
120 </template> 179 </template>
121 </el-table-column> 180 </el-table-column>
122 - </el-table> 181 + </template>
123 - 182 + </Tables>
124 - <pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total"
125 - :page.sync="queryParams.pageNum" :limit.sync="queryParams.limitSize" @pagination="findAllFltData" />
126 -
127 -
128 -
129 -
130 <!-- 添加或修改对话框 --> 183 <!-- 添加或修改对话框 -->
131 - <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"> 184 + <el-dialog
132 - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> 185 + :title="title"
186 + :visible.sync="open"
187 + width="60%"
188 + :close-on-click-modal="false"
189 + :append-to-body="true"
190 + >
191 + <el-form
192 + ref="form"
193 + :model="form"
194 + :rules="rules"
195 + label-position="right"
196 + label-width="auto"
197 + >
133 <el-row> 198 <el-row>
134 <el-col :span="12"> 199 <el-col :span="12">
135 <el-form-item label="航班号" prop="fltNo"> 200 <el-form-item label="航班号" prop="fltNo">
136 - <el-input @blur="blurfltNo" :disabled="formdisabled.fltNo" style="width:93%;" v-model="form.fltNo" 201 + <el-input
137 - placeholder="请输入航班号" /> 202 + @blur="blurfltNo"
203 + :disabled="formdisabled.fltNo"
204 + style="width: 93%"
205 + v-model="form.fltNo"
206 + placeholder="请输入航班号"
207 + maxlength="10"
208 + />
138 </el-form-item> 209 </el-form-item>
139 </el-col> 210 </el-col>
140 - <!-- <el-col :span="1"> &#12288;</el-col> -->
141 <el-col :span="12"> 211 <el-col :span="12">
142 <el-form-item label="航班日期" prop="fltDate"> 212 <el-form-item label="航班日期" prop="fltDate">
143 - 213 + <el-date-picker
144 - <el-date-picker :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate" type="date" 214 + :disabled="formdisabled.fltDate"
145 - value-format="yyyy-MM-dd" placeholder="选择航班日期"> 215 + clearable
216 + size="small"
217 + v-model="form.fltDate"
218 + type="date"
219 + value-format="yyyy-MM-dd"
220 + placeholder="选择航班日期"
221 + >
146 </el-date-picker> 222 </el-date-picker>
147 </el-form-item> 223 </el-form-item>
148 </el-col> 224 </el-col>
149 - 225 + <!-- <el-col :span="12">
150 - 226 + <el-form-item label="cutOff时间" prop="cutOffTime">
227 + <el-select v-model="form.cutOffTime" clearable placeholder="选择时间" type="string">
228 + <el-option
229 + v-for="item in selectOption.cutOffTime"
230 + :key="item"
231 + :label="item"
232 + :value="item">
233 + </el-option>
234 + </el-select>
235 + </el-form-item>
236 + </el-col> -->
151 <el-col :span="12"> 237 <el-col :span="12">
152 <el-form-item label="航班路线" prop="route"> 238 <el-form-item label="航班路线" prop="route">
153 - <el-input style="width:93%" v-model="form.route" placeholder="请输入航班路线" /> 239 + <el-input
240 + style="width: 93%"
241 + v-model="form.route"
242 + placeholder="请输入航班路线"
243 + />
154 </el-form-item> 244 </el-form-item>
155 </el-col> 245 </el-col>
156 -
157 <el-col :span="12"> 246 <el-col :span="12">
158 <el-form-item label="航班种类" prop="kindId"> 247 <el-form-item label="航班种类" prop="kindId">
159 <el-select v-model="form.kindId" placeholder="请选择航班种类"> 248 <el-select v-model="form.kindId" placeholder="请选择航班种类">
160 - <el-option v-for="item in flightKindlist" :key="item.id" :label="item.chineseName" :value="item.id"> 249 + <el-option
250 + v-for="item in selectOption.flightKindlist"
251 + :key="item.id"
252 + :label="item.chineseName"
253 + :value="item.id"
254 + >
161 </el-option> 255 </el-option>
162 </el-select> 256 </el-select>
163 </el-form-item> 257 </el-form-item>
...@@ -165,137 +259,516 @@ ...@@ -165,137 +259,516 @@
165 <el-col :span="12"> 259 <el-col :span="12">
166 <el-form-item label="航班类型" prop="typeId"> 260 <el-form-item label="航班类型" prop="typeId">
167 <el-select v-model="form.typeId" placeholder="请选择航班类型"> 261 <el-select v-model="form.typeId" placeholder="请选择航班类型">
168 - <el-option v-for="item in flightTypelist" :key="item.id" :label="item.chineseName" :value="item.id"> 262 + <el-option
263 + v-for="item in selectOption.flightTypelist"
264 + :key="item.id"
265 + :label="item.chineseName"
266 + :value="item.id"
267 + >
169 </el-option> 268 </el-option>
170 </el-select> 269 </el-select>
171 </el-form-item> 270 </el-form-item>
172 </el-col> 271 </el-col>
173 <el-col :span="12"> 272 <el-col :span="12">
174 <el-form-item label="航班状态" prop="statusId"> 273 <el-form-item label="航班状态" prop="statusId">
175 - <el-select :disabled="true" v-model="form.statusId" placeholder="请选择航班状态"> 274 + <el-select
176 - <el-option v-for="item in flightStatuslist" :key="item.id" :label="item.chineseName" :value="item.id"> 275 + :disabled="true"
276 + v-model="form.statusId"
277 + placeholder="请选择航班状态"
278 + >
279 + <el-option
280 + v-for="item in selectOption.flightStatuslist"
281 + :key="item.id"
282 + :label="item.chineseName"
283 + :value="item.id"
284 + >
177 </el-option> 285 </el-option>
178 </el-select> 286 </el-select>
179 </el-form-item> 287 </el-form-item>
180 </el-col> 288 </el-col>
181 <el-col :span="12"> 289 <el-col :span="12">
182 <el-form-item label="原始重量(KG)" prop="originalWeight"> 290 <el-form-item label="原始重量(KG)" prop="originalWeight">
183 - <el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%" 291 + <el-input-number
184 - v-model="form.originalWeight"></el-input-number> 292 + @change="LowHighAvailable"
293 + placeholder="请输入原始重量(KG)"
294 + style="width: 93%"
295 + v-model="form.originalWeight"
296 + ></el-input-number>
185 </el-form-item> 297 </el-form-item>
186 </el-col> 298 </el-col>
187 -
188 <el-col :span="12"> 299 <el-col :span="12">
189 <el-form-item label="额外增重百分比" prop="extraWeightPercent"> 300 <el-form-item label="额外增重百分比" prop="extraWeightPercent">
190 - <el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%" 301 + <el-input-number
191 - v-model="form.extraWeightPercent"></el-input-number> 302 + @change="LowHighAvailable"
303 + placeholder="请输入额外增重百分比"
304 + style="width: 93%"
305 + v-model="form.extraWeightPercent"
306 + ></el-input-number>
192 </el-form-item> 307 </el-form-item>
193 </el-col> 308 </el-col>
194 -
195 <el-col :span="12"> 309 <el-col :span="12">
196 <el-form-item label="是否开启高低价" prop="highLowPriceFlg"> 310 <el-form-item label="是否开启高低价" prop="highLowPriceFlg">
197 - <el-switch @change='LowHighAvailable' v-model="form.highLowPriceFlg" active-color="#13ce66"> 311 + <el-switch
312 + @change="LowHighAvailable"
313 + v-model="form.highLowPriceFlg"
314 + :active-value="1"
315 + :inactive-value="0"
316 + active-color="#13ce66"
317 + >
198 </el-switch> 318 </el-switch>
199 </el-form-item> 319 </el-form-item>
200 </el-col> 320 </el-col>
201 -
202 - <!-- 是否需要预审,1:预审,0:取消预审 -->
203 <el-col :span="12"> 321 <el-col :span="12">
204 <el-form-item label="是否预审" prop="isNeedRequired"> 322 <el-form-item label="是否预审" prop="isNeedRequired">
205 - <el-switch :disabled="true" v-model="form.isNeedRequired" active-color="#13ce66"> 323 + <el-switch
324 + :disabled="true"
325 + v-model="form.isNeedRequired"
326 + :active-value="1"
327 + :inactive-value="0"
328 + active-color="#13ce66"
329 + >
206 </el-switch> 330 </el-switch>
207 </el-form-item> 331 </el-form-item>
208 </el-col> 332 </el-col>
209 -
210 <el-col :span="12"> 333 <el-col :span="12">
211 <el-form-item label="高价百分比" prop="highPriceWeightPercent"> 334 <el-form-item label="高价百分比" prop="highPriceWeightPercent">
212 - <el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%" 335 + <el-input-number
213 - v-model="form.highPriceWeightPercent"></el-input-number> 336 + :disabled="ishighPriceWeightPercent"
337 + @change="LowHighAvailable"
338 + placeholder="请输入高价百分比"
339 + style="width: 93%"
340 + v-model="form.highPriceWeightPercent"
341 + ></el-input-number>
214 </el-form-item> 342 </el-form-item>
215 </el-col> 343 </el-col>
216 -
217 <el-col :span="12"> 344 <el-col :span="12">
218 <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> 345 <el-form-item label="低价百分比" prop="lowPriceWeightPercent">
219 - <el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%" 346 + <el-input-number
220 - v-model="form.lowPriceWeightPercent"></el-input-number> 347 + :disabled="true"
348 + placeholder="请输入低价百分比"
349 + style="width: 93%"
350 + v-model="form.lowPriceWeightPercent"
351 + ></el-input-number>
221 </el-form-item> 352 </el-form-item>
222 </el-col> 353 </el-col>
223 -
224 <el-col :span="12"> 354 <el-col :span="12">
225 <el-form-item label="高价可配重量" prop="highAvailableWeight"> 355 <el-form-item label="高价可配重量" prop="highAvailableWeight">
226 - 356 + <el-input-number
227 - <el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%" 357 + :disabled="true"
228 - v-model="form.highAvailableWeight" :precision="2"></el-input-number> 358 + placeholder="请输入高价可配重量"
359 + style="width: 93%"
360 + v-model="form.highAvailableWeight"
361 + :precision="2"
362 + ></el-input-number>
229 </el-form-item> 363 </el-form-item>
230 </el-col> 364 </el-col>
231 <el-col :span="12"> 365 <el-col :span="12">
232 <el-form-item label="低价可配重量" prop="lowAvailableWeight"> 366 <el-form-item label="低价可配重量" prop="lowAvailableWeight">
233 - <el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%" 367 + <el-input-number
234 - v-model="form.lowAvailableWeight" :precision="2"></el-input-number> 368 + :disabled="true"
369 + placeholder="请输入低价可配重量"
370 + style="width: 93%"
371 + v-model="form.lowAvailableWeight"
372 + :precision="2"
373 + ></el-input-number>
235 </el-form-item> 374 </el-form-item>
236 </el-col> 375 </el-col>
237 -
238 -
239 <el-col :span="12"> 376 <el-col :span="12">
240 <el-form-item label="高价已配重量" prop="highAllocatedWeight"> 377 <el-form-item label="高价已配重量" prop="highAllocatedWeight">
241 - <el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%" 378 + <el-input-number
242 - v-model="form.highAllocatedWeight" :precision="2"></el-input-number> 379 + :disabled="true"
380 + placeholder="请输入高价已配重量"
381 + style="width: 93%"
382 + v-model="form.highAllocatedWeight"
383 + :precision="2"
384 + ></el-input-number>
243 </el-form-item> 385 </el-form-item>
244 </el-col> 386 </el-col>
245 <el-col :span="12"> 387 <el-col :span="12">
246 <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> 388 <el-form-item label="低价已配重量" prop="lowAllocatedWeight">
247 - <el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%" 389 + <el-input-number
248 - v-model="form.lowAllocatedWeight" :precision="2"></el-input-number> 390 + :disabled="true"
391 + placeholder="请输入低价已配重量"
392 + style="width: 93%"
393 + v-model="form.lowAllocatedWeight"
394 + :precision="2"
395 + ></el-input-number>
249 </el-form-item> 396 </el-form-item>
250 </el-col> 397 </el-col>
251 <el-col :span="12"> 398 <el-col :span="12">
252 <el-form-item label="已配总重量" prop="alloctedWeight"> 399 <el-form-item label="已配总重量" prop="alloctedWeight">
253 - 400 + <el-input-number
254 - <el-input-number :disabled="true" placeholder="请输入已配总重量" style="width:93%" v-model="form.alloctedWeight" 401 + :disabled="true"
255 - :precision="2"></el-input-number> 402 + placeholder="请输入已配总重量"
256 - 403 + style="width: 93%"
404 + v-model="form.alloctedWeight"
405 + :precision="2"
406 + ></el-input-number>
257 </el-form-item> 407 </el-form-item>
258 </el-col> 408 </el-col>
259 -
260 -
261 </el-row> 409 </el-row>
262 -
263 -
264 </el-form> 410 </el-form>
265 <div slot="footer" class="dialog-footer"> 411 <div slot="footer" class="dialog-footer">
266 <el-button type="primary" @click="submitForm">确 定</el-button> 412 <el-button type="primary" @click="submitForm">确 定</el-button>
267 <el-button @click="cancel">取 消</el-button> 413 <el-button @click="cancel">取 消</el-button>
268 </div> 414 </div>
269 </el-dialog> 415 </el-dialog>
270 - 416 + <el-dialog
271 - <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" :append-to-body="true"> 417 + title="未删除成功航班"
418 + width="40%"
419 + center
420 + :visible.sync="dialogTableVisible"
421 + :close-on-click-modal="false"
422 + :append-to-body="true"
423 + >
272 <el-table :data="gridData"> 424 <el-table :data="gridData">
273 - <el-table-column property="fltNo" label="航班号" width="150"></el-table-column> 425 + <el-table-column property="fltNo" label="航班号"></el-table-column>
274 - <el-table-column property="fltDate" label="航班日期" width="200"></el-table-column> 426 + <el-table-column property="fltDate" label="航班日期"></el-table-column>
275 - <el-table-column property="alloctedWeight" label="已配重量" width="200"></el-table-column> 427 + <el-table-column
428 + property="alloctedWeight"
429 + label="已配重量"
430 + ></el-table-column>
276 </el-table> 431 </el-table>
277 </el-dialog> 432 </el-dialog>
278 </div> 433 </div>
279 </template> 434 </template>
435 +
280 <script> 436 <script>
281 - import { 437 +import {
282 delFlight, 438 delFlight,
283 findFltConditionDataApi, 439 findFltConditionDataApi,
284 findAllFltDataApi, 440 findAllFltDataApi,
285 findFltById, 441 findFltById,
286 saveOrUpdate, 442 saveOrUpdate,
287 findFltCommonConf, 443 findFltCommonConf,
288 - updateStatusBatch 444 + updateStatusBatch,
289 - 445 +} from "@/api/findAllFltData";
290 - } from "@/api/findAllFltData"; 446 +export default {
291 - export default {
292 name: "FlightInformationMaintenance", 447 name: "FlightInformationMaintenance",
293 data() { 448 data() {
294 return { 449 return {
295 - gridData:[], 450 + //查询参数
296 - dialogTableVisible: false, 451 + queryParams: {
297 - //高价百分比是否打开 452 + limitStart: 0, //当前条数【代表第几条数据 +1开始】
298 - ishighPriceWeightPercent:true, 453 + pageNum: 1,
454 + limitSize: 20, //一页显示多少条数据
455 + fltDateStart: undefined, //航班日期开始
456 + fltDateEnd: undefined, //航班日期结束
457 + typeId: undefined, //航班类型
458 + statusId: undefined, //航班状态
459 + flightKindId: undefined, //航班种类
460 + fltNo: undefined, //航班号,要大写
461 + },
462 + //表单参数
463 + form: {},
464 + //表单校验
465 + rules: {
466 + fltNo: [
467 + {
468 + required: true,
469 + message: "ACCS原航班号不能为空",
470 + trigger: "blur",
471 + },
472 + ],
473 + fltDate: [
474 + {
475 + required: true,
476 + message: "航班日期不能为空",
477 + trigger: "blur",
478 + },
479 + ],
480 + kindId: [
481 + {
482 + required: true,
483 + message: "航班种类不能为空",
484 + trigger: "change",
485 + },
486 + ],
487 + originalWeight: [
488 + {
489 + required: true,
490 + message: "原始重量(KG)不能为空",
491 + trigger: "blur",
492 + },
493 + ],
494 + },
495 + //原航班规则数据
496 + findAllFltDatList: [],
497 + //表头
498 + tableHeader: [
499 + {
500 + type: "selection",
501 + name: "",
502 + value: "",
503 + width: "50",
504 + align: "center",
505 + sorTable: false,
506 + fixed: true,
507 + disabled: true,
508 + },
509 + {
510 + type: "index",
511 + name: "",
512 + value: "",
513 + width: "50",
514 + align: "center",
515 + sorTable: false,
516 + fixed: false,
517 + disabled: true,
518 + },
519 + {
520 + type: "",
521 + name: "航班日期",
522 + value: "fltDate",
523 + width: "100",
524 + align: "center",
525 + sorTable: false,
526 + fixed: false,
527 + disabled: true,
528 + },
529 + {
530 + type: "",
531 + name: "航班起飞时间",
532 + value: "takeOffTime",
533 + width: "120",
534 + align: "center",
535 + sorTable: false,
536 + fixed: false,
537 + disabled: true,
538 + },
539 + // {
540 + // type: "",
541 + // name: "cutOff时间",
542 + // value: "cutOffTime",
543 + // width: "110",
544 + // align: "center",
545 + // sorTable: false,
546 + // fixed: false,
547 + // disabled:true
548 + // },
549 + {
550 + type: "",
551 + name: "航班号",
552 + value: "fltNo",
553 + width: "100",
554 + align: "center",
555 + sorTable: false,
556 + fixed: false,
557 + disabled: true,
558 + },
559 + {
560 + type: "",
561 + name: "航班路线",
562 + value: "route",
563 + width: "140",
564 + align: "center",
565 + sorTable: false,
566 + fixed: false,
567 + disabled: true,
568 + },
569 + {
570 + type: "",
571 + name: "航班类型",
572 + value: "typeName",
573 + width: "100",
574 + align: "center",
575 + sorTable: false,
576 + fixed: false,
577 + disabled: true,
578 + },
579 + {
580 + type: "",
581 + name: "航班种类",
582 + value: "flightKindName",
583 + width: "100",
584 + align: "center",
585 + sorTable: false,
586 + fixed: false,
587 + disabled: true,
588 + },
589 + {
590 + type: "",
591 + name: "航班状态",
592 + value: "statusName",
593 + width: "100",
594 + align: "center",
595 + sorTable: false,
596 + fixed: false,
597 + disabled: true,
598 + },
599 + {
600 + type: "",
601 + name: "总重量",
602 + value: "totalWeight",
603 + width: "90",
604 + align: "center",
605 + sorTable: false,
606 + fixed: false,
607 + disabled: true,
608 + },
609 + {
610 + type: "",
611 + name: "原始重量(KG)",
612 + value: "originalWeight",
613 + width: "120",
614 + align: "center",
615 + sorTable: false,
616 + fixed: false,
617 + disabled: true,
618 + },
619 + {
620 + type: "",
621 + name: "总体积(cm³)",
622 + value: "totalVolume",
623 + width: "100",
624 + align: "center",
625 + sorTable: false,
626 + fixed: false,
627 + disabled: true,
628 + },
629 + {
630 + type: "",
631 + name: "是否限制一票一件",
632 + value: "ticketToPiece",
633 + width: "140",
634 + align: "center",
635 + sorTable: false,
636 + fixed: false,
637 + disabled: true,
638 + },
639 + {
640 + type: "",
641 + name: "是否需要预审",
642 + value: "needRequired",
643 + width: "130",
644 + align: "center",
645 + sorTable: false,
646 + fixed: false,
647 + disabled: true,
648 + },
649 + {
650 + type: "",
651 + name: "是否开启高地价",
652 + value: "highLowPriceFlg",
653 + width: "140",
654 + align: "center",
655 + sorTable: false,
656 + fixed: false,
657 + disabled: true,
658 + },
659 + {
660 + type: "",
661 + name: "额外增重百分比",
662 + value: "extraWeightPercent",
663 + width: "140",
664 + align: "center",
665 + sorTable: false,
666 + fixed: false,
667 + disabled: true,
668 + },
669 + {
670 + type: "",
671 + name: "高价百分比",
672 + value: "highPriceWeightPercent",
673 + width: "120",
674 + align: "center",
675 + sorTable: false,
676 + fixed: false,
677 + disabled: true,
678 + },
679 + {
680 + type: "",
681 + name: "低价百分比",
682 + value: "lowPriceWeightPercent",
683 + width: "120",
684 + align: "center",
685 + sorTable: false,
686 + fixed: false,
687 + disabled: true,
688 + },
689 + {
690 + type: "",
691 + name: "已配重量",
692 + value: "alloctedWeight",
693 + width: "90",
694 + align: "center",
695 + sorTable: false,
696 + fixed: false,
697 + disabled: true,
698 + },
699 + {
700 + type: "",
701 + name: "已配体积(cm³)",
702 + value: "alloctedVolume",
703 + width: "120",
704 + align: "center",
705 + sorTable: false,
706 + fixed: false,
707 + disabled: true,
708 + },
709 + {
710 + type: "",
711 + name: "航班优先级",
712 + value: "priorityName",
713 + width: "100",
714 + align: "center",
715 + sorTable: false,
716 + fixed: false,
717 + disabled: true,
718 + },
719 + {
720 + type: "",
721 + name: "配舱优先级",
722 + value: "priorityRuleName",
723 + width: "100",
724 + align: "center",
725 + sorTable: false,
726 + fixed: false,
727 + disabled: true,
728 + },
729 + {
730 + type: "",
731 + name: "创建人",
732 + value: "createUserName",
733 + width: "90",
734 + align: "center",
735 + sorTable: false,
736 + fixed: false,
737 + disabled: true,
738 + },
739 + {
740 + type: "",
741 + name: "创建时间",
742 + value: "createTime",
743 + width: "100",
744 + align: "center",
745 + sorTable: false,
746 + fixed: false,
747 + disabled: true,
748 + },
749 + {
750 + type: "",
751 + name: "最后修改人",
752 + value: "lastModifyUserName",
753 + width: "120",
754 + align: "center",
755 + sorTable: false,
756 + fixed: false,
757 + disabled: true,
758 + },
759 + {
760 + type: "",
761 + name: "最后修改时间",
762 + value: "lastModifyTime",
763 + width: "120",
764 + align: "center",
765 + sorTable: false,
766 + fixed: false,
767 + disabled: true,
768 + },
769 + ],
770 + //删除失败数据
771 + gridData: [],
299 //form属性禁用状态 772 //form属性禁用状态
300 formdisabled: { 773 formdisabled: {
301 //航班号 774 //航班号
...@@ -309,130 +782,164 @@ ...@@ -309,130 +782,164 @@
309 //航班类型 782 //航班类型
310 typeId: false, 783 typeId: false,
311 //原始重量 784 //原始重量
312 - originalWeight: false 785 + originalWeight: false,
313 }, 786 },
314 - 787 + //下拉框数据
788 + selectOption: {
315 //航班种类 789 //航班种类
316 flightKindlist: [], 790 flightKindlist: [],
317 //航班状态 791 //航班状态
318 flightStatuslist: [], 792 flightStatuslist: [],
319 //航班类型 793 //航班类型
320 flightTypelist: [], 794 flightTypelist: [],
321 - // 选中数组 795 + //cutOffTime数据
796 + cutOffTime: [
797 + "00:00:00",
798 + "01:00:00",
799 + "02:00:00",
800 + "03:00:00",
801 + "04:00:00",
802 + "05:00:00",
803 + "06:00:00",
804 + "07:00:00",
805 + "08:00:00",
806 + "09:00:00",
807 + "10:00:00",
808 + "11:00:00",
809 + "12:00:00",
810 + "13:00:00",
811 + "14:00:00",
812 + "15:00:00",
813 + "16:00:00",
814 + "17:00:00",
815 + "18:00:00",
816 + "19:00:00",
817 + "20:00:00",
818 + "21:00:00",
819 + "22:00:00",
820 + "23:00:00",
821 + ],
822 + },
823 + //选中数组
322 ids: [], 824 ids: [],
323 - // 非单个禁用 825 + //目的航班数据
324 - single: true, 826 + sourceFlightAndFlightDate: [],
325 - // 非多个禁用 827 + //高价百分比是否打开
828 + ishighPriceWeightPercent: true,
829 + //非单个禁用
830 + //single: true,
831 + //非多个禁用
326 multiple: true, 832 multiple: true,
327 - 833 + //遮罩层
328 - // 遮罩层
329 loading: false, 834 loading: false,
330 - // 遮罩层 835 + //遮罩层
331 loadingFlightDate: false, 836 loadingFlightDate: false,
332 - // 弹出层标题 837 + //删除失败弹框
838 + dialogTableVisible: false,
839 + //弹出层标题
333 title: "", 840 title: "",
334 - // 总条数 841 + //总条数
335 total: 0, 842 total: 0,
336 - // 原航班规则数据 843 + //表格高度
337 - findAllFltDatList: [], 844 + tableHeight: null,
338 - //目的航班数据 845 + //新增修改查看规则弹出层
339 - sourceFlightAndFlightDate: [],
340 - statusList: [{
341 - 'id': 1,
342 - 'name': '有效'
343 - }, {
344 - 'id': 3,
345 - 'name': '停用'
346 - }],
347 - // 新增修改查看规则弹出层
348 open: false, 846 open: false,
349 - // 是否显示查看目的航班弹出层 847 + //是否显示查看目的航班弹出层
350 openFlightDate: false, 848 openFlightDate: false,
351 - // 查询参数 849 + //shift键状态
352 - queryParams: { 850 + shiftKey: false,
353 - limitStart: 0, //当前条数【代表第几条数据 +1开始】
354 - pageNum: 1,
355 - limitSize: 20, //一页显示多少条数据
356 - fltDateStart: undefined, //航班日期开始
357 - fltDateEnd: undefined, //航班日期结束
358 - typeId: undefined, //航班类型
359 - statusId: undefined, //航班状态
360 - flightKindId: undefined, //航班种类
361 - fltNo: undefined //航班号,要大写
362 - },
363 -
364 - // 表单参数
365 - form: {
366 -
367 -
368 - },
369 - // 表单校验
370 - rules: {
371 - fltNo: [{
372 - required: true,
373 - message: "ACCS原航班号不能为空",
374 - trigger: "blur"
375 - }],
376 - fltDate: [{
377 - required: true,
378 - message: "航班日期不能为空",
379 - trigger: "blur"
380 - }],
381 - kindId: [{
382 - required: true,
383 - message: "航班种类不能为空",
384 - trigger: "change"
385 - }],
386 - originalWeight: [{
387 - required: true,
388 - message: "原始重量(KG)不能为空",
389 - trigger: "blur"
390 - }],
391 - }
392 }; 851 };
393 }, 852 },
394 created() { 853 created() {
395 //查询条件数据源 854 //查询条件数据源
396 this.findFltConditionData(); 855 this.findFltConditionData();
856 + if (this.$store.state.tagsView.cachedViews.length == 0) {
857 + this.findAllFltData();
858 + }
859 + },
860 + activated() {
397 this.findAllFltData(); 861 this.findAllFltData();
398 }, 862 },
863 + mounted() {
864 + window.addEventListener("keydown", (code) => {
865 + if (code.keyCode === 16 && code.shiftKey) {
866 + this.shiftKey = true;
867 + }
868 + });
869 + window.addEventListener("keyup", (code) => {
870 + if (code.keyCode === 16) {
871 + this.shiftKey = false;
872 + }
873 + });
874 + this.tableHeight =
875 + window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
876 + },
399 methods: { 877 methods: {
400 //输入航班号后 878 //输入航班号后
401 blurfltNo() { 879 blurfltNo() {
402 - if (this.form.fltNo != null && this.form.fltNo != undefined && this.form.fltNo != "") { 880 + if (
881 + this.form.fltNo != null &&
882 + this.form.fltNo != undefined &&
883 + this.form.fltNo != ""
884 + ) {
403 this.form.fltNo = this.form.fltNo.toUpperCase(); 885 this.form.fltNo = this.form.fltNo.toUpperCase();
404 - findFltCommonConf(this.form).then(response => { 886 + findFltCommonConf(this.form).then((response) => {
405 if (response.code == 200) { 887 if (response.code == 200) {
406 //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 888 //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
407 - if (response.data!=null && response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) { 889 + if (
408 - this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent); 890 + response.data != null &&
891 + response.data.extraWeightPercent != null &&
892 + response.data.extraWeightPercent != undefined
893 + ) {
894 + this.$set(
895 + this.form,
896 + "extraWeightPercent",
897 + response.data.extraWeightPercent
898 + );
409 // this.form.extraWeightPercent=response.data.extraWeightPercent; 899 // this.form.extraWeightPercent=response.data.extraWeightPercent;
410 } else { 900 } else {
411 this.$set(this.form, "extraWeightPercent", 0); 901 this.$set(this.form, "extraWeightPercent", 0);
412 //this.form.extraWeightPercent=response.data.extraWeightPercent=0; 902 //this.form.extraWeightPercent=response.data.extraWeightPercent=0;
413 } 903 }
414 //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 904 //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
415 - if (response.data!=null &&response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) { 905 + if (
416 - this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false; 906 + response.data != null &&
907 + response.data.highLowPriceFlg != null &&
908 + response.data.highLowPriceFlg != undefined
909 + ) {
910 + this.form.highLowPriceFlg = response.data.highLowPriceFlg;
417 } else { 911 } else {
418 - this.$set(this.form, "highLowPriceFlg", true); 912 + this.$set(this.form, "highLowPriceFlg", 1);
419 //this.form.highLowPriceFlg = true; 913 //this.form.highLowPriceFlg = true;
420 } 914 }
421 //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; 915 //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
422 - if (response.data!=null &&response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) { 916 + if (
423 - this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false; 917 + response.data != null &&
918 + response.data.isNeedRequired != null &&
919 + response.data.isNeedRequired != undefined
920 + ) {
921 + this.form.isNeedRequired = response.data.isNeedRequired;
424 } else { 922 } else {
425 - this.form.isNeedRequired = false; 923 + this.form.isNeedRequired = 0;
426 } 924 }
427 //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 925 //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑
428 - if (response.data!=null &&response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent != 926 + if (
429 - undefined) { 927 + response.data != null &&
430 - this.form.highPriceWeightPercent = response.data.highPriceWeightPercent; 928 + response.data.highPriceWeightPercent != null &&
929 + response.data.highPriceWeightPercent != undefined
930 + ) {
931 + this.form.highPriceWeightPercent =
932 + response.data.highPriceWeightPercent;
431 } else { 933 } else {
432 this.form.highPriceWeightPercent = 60; 934 this.form.highPriceWeightPercent = 60;
433 } 935 }
434 - if (response.data!=null &&response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) { 936 + if (
435 - this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent; 937 + response.data != null &&
938 + response.data.lowPriceWeightPercent != null &&
939 + response.data.lowPriceWeightPercent != undefined
940 + ) {
941 + this.form.lowPriceWeightPercent =
942 + response.data.lowPriceWeightPercent;
436 } else { 943 } else {
437 this.form.lowPriceWeightPercent = 40; 944 this.form.lowPriceWeightPercent = 40;
438 } 945 }
...@@ -440,94 +947,51 @@ ...@@ -440,94 +947,51 @@
440 } else { 947 } else {
441 this.msgError(response.msg); 948 this.msgError(response.msg);
442 } 949 }
443 -
444 }); 950 });
445 -
446 } 951 }
447 -
448 -
449 - },
450 - // 是否一票一件
451 - ticketToPieceFormat(row) {
452 - if (row.ticketToPiece === 1) {
453 - return '是'
454 - } else {
455 - return '否'
456 - }
457 - return row.ticketToPiece;
458 - },
459 - // 是否需要预审 1 预审 0 取消预审
460 - needRequiredFormat(row) {
461 - if (row.needRequired === 1) {
462 - return '是'
463 - } else {
464 - return '否'
465 - }
466 - return row.ticketToPiece;
467 - },
468 - //是否开启高低价
469 - highLowPriceFlgFormat(row) {
470 - if (row.highLowPriceFlg === 1) {
471 - return '开启'
472 - } else {
473 - return '未开启'
474 - }
475 - return row.ticketToPiece;
476 - },
477 - //时间格式化
478 - renderTime(date) {
479 - var dateee = new Date(date).toJSON();
480 - return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
481 }, 952 },
482 //查询条件数据源 953 //查询条件数据源
483 findFltConditionData() { 954 findFltConditionData() {
484 - findFltConditionDataApi().then(response => { 955 + findFltConditionDataApi().then((response) => {
485 if (response.code == 200) { 956 if (response.code == 200) {
486 //航班种类 957 //航班种类
487 - this.flightKindlist = response.data.flightKind; 958 + this.selectOption.flightKindlist = response.data.flightKind;
488 //航班类型 959 //航班类型
489 - this.flightTypelist = response.data.flightType; 960 + this.selectOption.flightTypelist = response.data.flightType;
490 //航班状态 961 //航班状态
491 - this.flightStatuslist = response.data.flightStatus; 962 + this.selectOption.flightStatuslist = response.data.flightStatus;
492 -
493 } else { 963 } else {
494 this.msgError(response.msg); 964 this.msgError(response.msg);
495 } 965 }
496 -
497 }); 966 });
498 }, 967 },
499 -
500 - // 多选框选中数据
501 - handleSelectionChange(selection) {
502 - this.ids = selection.map(item => item.id)
503 - this.single = selection.length != 1
504 - this.multiple = !selection.length
505 - },
506 -
507 /** 航班信息维护查询*/ 968 /** 航班信息维护查询*/
508 findAllFltData() { 969 findAllFltData() {
970 + this.ids = [];
971 + this.multiple = true;
509 this.loading = true; 972 this.loading = true;
510 if (this.queryParams.pageNum > 1) { 973 if (this.queryParams.pageNum > 1) {
511 - this.queryParams.limitStart = (this.queryParams.pageNum - 1) * this.queryParams.limitSize 974 + this.queryParams.limitStart =
975 + (this.queryParams.pageNum - 1) * this.queryParams.limitSize;
512 } else { 976 } else {
513 this.queryParams.limitStart = 0; 977 this.queryParams.limitStart = 0;
514 } 978 }
515 - if (this.queryParams.fltNo != null && this.queryParams.fltNo != undefined && this.queryParams.fltNo != '') { 979 + if (
980 + this.queryParams.fltNo != null &&
981 + this.queryParams.fltNo != undefined &&
982 + this.queryParams.fltNo != ""
983 + ) {
516 this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase(); 984 this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase();
517 } 985 }
518 - 986 + findAllFltDataApi(this.queryParams).then((response) => {
519 - findAllFltDataApi(this.queryParams).then(response => { 987 + this.loading = false;
520 if (response.code == 200) { 988 if (response.code == 200) {
521 -
522 this.findAllFltDatList = response.data.list; 989 this.findAllFltDatList = response.data.list;
523 this.total = response.data.totalCount; 990 this.total = response.data.totalCount;
524 - this.loading = false;
525 } else { 991 } else {
526 this.msgError(response.msg); 992 this.msgError(response.msg);
527 } 993 }
528 -
529 }); 994 });
530 -
531 }, 995 },
532 /** 新增按钮操作 */ 996 /** 新增按钮操作 */
533 handleAdd() { 997 handleAdd() {
...@@ -535,11 +999,10 @@ ...@@ -535,11 +999,10 @@
535 this.open = true; 999 this.open = true;
536 this.title = "添加航班信息"; 1000 this.title = "添加航班信息";
537 this.form.id = null; 1001 this.form.id = null;
538 - this.form.statusId = this.flightStatuslist[0].id; 1002 + this.form.statusId = this.selectOption.flightStatuslist[0].id;
539 this.form.alloctedWeight = 0; //已配重量 1003 this.form.alloctedWeight = 0; //已配重量
540 this.form.lowAllocatedWeight = 0; //低价已配重量 1004 this.form.lowAllocatedWeight = 0; //低价已配重量
541 this.form.highAllocatedWeight = 0; //高价已配重量 1005 this.form.highAllocatedWeight = 0; //高价已配重量
542 -
543 //航班号 1006 //航班号
544 this.formdisabled.fltNo = false; 1007 this.formdisabled.fltNo = false;
545 //航班日期 1008 //航班日期
...@@ -557,61 +1020,96 @@ ...@@ -557,61 +1020,96 @@
557 LowHighAvailable() { 1020 LowHighAvailable() {
558 //判断是否开启高地价 1021 //判断是否开启高地价
559 if (this.form.highLowPriceFlg) { 1022 if (this.form.highLowPriceFlg) {
560 - this.ishighPriceWeightPercent=false; 1023 + this.ishighPriceWeightPercent = false;
561 let Weight = 0; 1024 let Weight = 0;
562 //计算实际重量 1025 //计算实际重量
563 - if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) { 1026 + if (
1027 + this.form.highPriceWeightPercent > 0 ||
1028 + this.form.lowPriceWeightPercent > 0
1029 + ) {
564 Weight = this.Weightall(); 1030 Weight = this.Weightall();
565 } 1031 }
566 //高价可配 1032 //高价可配
567 if (this.form.highPriceWeightPercent >= 0) { 1033 if (this.form.highPriceWeightPercent >= 0) {
568 - this.$set(this.form, "lowPriceWeightPercent", 100-this.form.highPriceWeightPercent); 1034 + this.$set(
569 - this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form 1035 + this.form,
570 - .highPriceWeightPercent / 100)); 1036 + "lowPriceWeightPercent",
1037 + 100 - this.form.highPriceWeightPercent
1038 + );
1039 + this.$set(
1040 + this.form,
1041 + "highAvailableWeight",
1042 + (Weight - this.form.alloctedWeight) *
1043 + (this.form.highPriceWeightPercent / 100)
1044 + );
571 // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) 1045 // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
572 - }else if(this.title == "修改航班信息" && this.form.highPriceWeightPercent > 0){ 1046 + } else if (
573 - if(this.form.highAvailableWeight){ 1047 + this.title == "修改航班信息" &&
574 - this.$set(this.form, 'highAvailableWeight', this.form.highAvailableWeight) 1048 + this.form.highPriceWeightPercent > 0
575 - }else{ 1049 + ) {
576 - this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form 1050 + if (this.form.highAvailableWeight) {
577 - .highPriceWeightPercent / 100)); 1051 + this.$set(
1052 + this.form,
1053 + "highAvailableWeight",
1054 + this.form.highAvailableWeight
1055 + );
1056 + } else {
1057 + this.$set(
1058 + this.form,
1059 + "highAvailableWeight",
1060 + (Weight - this.form.alloctedWeight) *
1061 + (this.form.highPriceWeightPercent / 100)
1062 + );
578 } 1063 }
579 - }else { 1064 + } else {
580 this.$set(this.form, "highAvailableWeight", 0); 1065 this.$set(this.form, "highAvailableWeight", 0);
581 // this.form.HighAvailableWeight = 0; 1066 // this.form.HighAvailableWeight = 0;
582 } 1067 }
583 //低价可配 1068 //低价可配
584 if (this.form.lowPriceWeightPercent > 0) { 1069 if (this.form.lowPriceWeightPercent > 0) {
585 - this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form 1070 + this.$set(
586 - .highAvailableWeight); 1071 + this.form,
1072 + "lowAvailableWeight",
1073 + Weight - this.form.alloctedWeight - this.form.highAvailableWeight
1074 + );
587 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; 1075 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
588 - }else if(this.title == "修改航班信息" && this.form.lowPriceWeightPercent > 0){ 1076 + } else if (
589 - if(this.form.lowAvailableWeight){ 1077 + this.title == "修改航班信息" &&
590 - this.$set(this.form, 'lowAvailableWeight', this.form.lowAvailableWeight) 1078 + this.form.lowPriceWeightPercent > 0
591 - }else{ 1079 + ) {
592 - this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form 1080 + if (this.form.lowAvailableWeight) {
593 - .highAvailableWeight); 1081 + this.$set(
1082 + this.form,
1083 + "lowAvailableWeight",
1084 + this.form.lowAvailableWeight
1085 + );
1086 + } else {
1087 + this.$set(
1088 + this.form,
1089 + "lowAvailableWeight",
1090 + Weight - this.form.alloctedWeight - this.form.highAvailableWeight
1091 + );
594 } 1092 }
595 - }else { 1093 + } else {
596 this.$set(this.form, "lowAvailableWeight", 0); 1094 this.$set(this.form, "lowAvailableWeight", 0);
597 // this.form.lowAvailableWeight = 0; 1095 // this.form.lowAvailableWeight = 0;
598 } 1096 }
599 - }else{ 1097 + } else {
600 - this.ishighPriceWeightPercent=true; 1098 + this.ishighPriceWeightPercent = true;
601 } 1099 }
602 -
603 }, 1100 },
604 //计算实际重量 1101 //计算实际重量
605 Weightall() { 1102 Weightall() {
606 let Weight = 0; 1103 let Weight = 0;
607 if (this.form.extraWeightPercent > 0) { 1104 if (this.form.extraWeightPercent > 0) {
608 - Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100) 1105 + Weight =
609 - }else { 1106 + this.form.originalWeight +
1107 + this.form.originalWeight * (this.form.extraWeightPercent / 100);
1108 + } else {
610 Weight = this.form.originalWeight; 1109 Weight = this.form.originalWeight;
611 } 1110 }
612 return Weight; 1111 return Weight;
613 }, 1112 },
614 -
615 /** 修改按钮操作 */ 1113 /** 修改按钮操作 */
616 handleUpdate(row) { 1114 handleUpdate(row) {
617 this.reset(); 1115 this.reset();
...@@ -622,81 +1120,85 @@ ...@@ -622,81 +1120,85 @@
622 //航班日期 1120 //航班日期
623 this.formdisabled.fltDate = true; 1121 this.formdisabled.fltDate = true;
624 //根据ID查item 1122 //根据ID查item
625 - findFltById(row).then(response => { 1123 + findFltById(row).then((response) => {
626 if (response.code == 200) { 1124 if (response.code == 200) {
627 this.form = response.data; 1125 this.form = response.data;
628 //是否开启高地价 1126 //是否开启高地价
629 - this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false; 1127 + // this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false;
630 //是否预审 1128 //是否预审
631 - this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false; 1129 + // this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false;
632 // 计算高地价可配 1130 // 计算高地价可配
633 this.LowHighAvailable(); 1131 this.LowHighAvailable();
634 -
635 } else { 1132 } else {
636 this.msgError(response.msg); 1133 this.msgError(response.msg);
637 } 1134 }
638 -
639 }); 1135 });
640 }, 1136 },
641 /** 删除按钮操作 */ 1137 /** 删除按钮操作 */
642 handleDelete(row) { 1138 handleDelete(row) {
643 - const fIds =this.ids; 1139 + const fIds = this.ids;
644 - this.$confirm('是否确认删除所选数据?', "警告", { 1140 + this.$confirm("是否确认删除所选数据?", "警告", {
645 confirmButtonText: "确定", 1141 confirmButtonText: "确定",
646 cancelButtonText: "取消", 1142 cancelButtonText: "取消",
647 - type: "warning" 1143 + type: "warning",
648 - }).then(function() { 1144 + })
1145 + .then(() => {
649 return delFlight(fIds); 1146 return delFlight(fIds);
650 - }).then(response => { 1147 + })
1148 + .then((response) => {
651 this.findAllFltData(); 1149 this.findAllFltData();
652 - if(response.data.length>0){ 1150 + if (response.data.length > 0) {
653 - this.gridData=response.data; 1151 + this.gridData = response.data;
654 - this.$confirm(response.msg, '提示', { 1152 + this.$confirm(response.msg, "提示", {
655 - confirmButtonText: '查看删除失败航班信息', 1153 + confirmButtonText: "查看删除失败航班信息",
656 - cancelButtonText: '取消', 1154 + cancelButtonText: "取消",
657 - type: 'warning', 1155 + type: "warning",
658 - center: true 1156 + center: true,
659 - }).then(() => { 1157 + })
660 - this.dialogTableVisible=true; 1158 + .then(() => {
661 - }).catch(function() { }); 1159 + this.dialogTableVisible = true;
662 - 1160 + })
663 - }else{ 1161 + .catch(() => {});
1162 + } else {
664 this.msgSuccess(response.msg); 1163 this.msgSuccess(response.msg);
665 } 1164 }
666 - }).catch(function() {}); 1165 + })
1166 + .catch(() => {});
667 }, 1167 },
668 -
669 /** 提交按钮 */ 1168 /** 提交按钮 */
670 - submitForm: function() { 1169 + submitForm: function () {
671 - this.$refs["form"].validate(valid => { 1170 + this.$refs["form"].validate((valid) => {
672 if (valid) { 1171 if (valid) {
673 let formdata = JSON.parse(JSON.stringify(this.form)); 1172 let formdata = JSON.parse(JSON.stringify(this.form));
674 -
675 //高价百分比和低价百分比和不可以大于100 1173 //高价百分比和低价百分比和不可以大于100
676 - if (this.form.highLowPriceFlg && (formdata.highPriceWeightPercent>100||formdata.highPriceWeightPercent<0) ) { 1174 + if (
1175 + this.form.highLowPriceFlg &&
1176 + (formdata.highPriceWeightPercent > 100 ||
1177 + formdata.highPriceWeightPercent < 0)
1178 + ) {
677 this.$message.warning("请正确填写高低价百分比"); 1179 this.$message.warning("请正确填写高低价百分比");
678 return; 1180 return;
679 } 1181 }
680 //已删除的无法修改 1182 //已删除的无法修改
681 //拿到已删除的id 1183 //拿到已删除的id
682 - let statusId=0; 1184 + let statusId = 0;
683 - this.flightStatuslist.map((item) => { 1185 + this.selectOption.flightStatuslist.map((item) => {
684 // this.unitList 是你 select option遍历的集合 e 是选中的id 1186 // this.unitList 是你 select option遍历的集合 e 是选中的id
685 if (item.chineseName === "已删除") { 1187 if (item.chineseName === "已删除") {
686 - statusId=item.id; 1188 + statusId = item.id;
687 return; 1189 return;
688 } 1190 }
689 - }) 1191 + });
690 if (statusId === formdata.statusId) { 1192 if (statusId === formdata.statusId) {
691 this.$message.warning("已删除的航班无法修改"); 1193 this.$message.warning("已删除的航班无法修改");
692 return; 1194 return;
693 } 1195 }
694 //是否开启高地价 1196 //是否开启高地价
695 - formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0; 1197 + // formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0;
696 //是否预审 1198 //是否预审
697 - formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0; 1199 + // formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
698 //处理数据 1200 //处理数据
699 - saveOrUpdate(formdata).then(response => { 1201 + saveOrUpdate(formdata).then((response) => {
700 if (response.code === 200) { 1202 if (response.code === 200) {
701 this.msgSuccess("保存成功"); 1203 this.msgSuccess("保存成功");
702 this.open = false; 1204 this.open = false;
...@@ -705,22 +1207,20 @@ ...@@ -705,22 +1207,20 @@
705 this.msgError(response.msg); 1207 this.msgError(response.msg);
706 } 1208 }
707 }); 1209 });
708 -
709 } 1210 }
710 }); 1211 });
711 }, 1212 },
712 - // 表单重置 1213 + //表单重置
713 reset() { 1214 reset() {
714 this.form = {}; 1215 this.form = {};
715 this.resetForm("form"); 1216 this.resetForm("form");
716 }, 1217 },
717 - // 取消按钮 1218 + //取消按钮
718 cancel() { 1219 cancel() {
719 this.open = false; 1220 this.open = false;
720 this.findAllFltData(); 1221 this.findAllFltData();
721 this.reset(); 1222 this.reset();
722 }, 1223 },
723 -
724 /** 重置按钮操作 */ 1224 /** 重置按钮操作 */
725 resetQuery() { 1225 resetQuery() {
726 this.resetForm("queryForm"); 1226 this.resetForm("queryForm");
...@@ -733,37 +1233,64 @@ ...@@ -733,37 +1233,64 @@
733 this.findAllFltData(); 1233 this.findAllFltData();
734 }, 1234 },
735 //批量开启/关闭航班 1235 //批量开启/关闭航班
736 - handleFlightStatus(status){ 1236 + handleFlightStatus(status) {
737 - let handle = status == 'flightStatus80' ? '关闭' : '开启' 1237 + let handle = status == "flightStatus80" ? "关闭" : "开启";
738 - if (this.ids.length == 0){ 1238 + if (this.ids.length == 0) {
739 - this.msgError('请选择批量' + handle + '的航班') 1239 + this.msgError("请选择批量" + handle + "的航班");
740 return; 1240 return;
741 } 1241 }
742 let data = {}; 1242 let data = {};
743 data.status = status; 1243 data.status = status;
744 data.updateIds = this.ids; 1244 data.updateIds = this.ids;
745 1245
746 - updateStatusBatch(data).then(response => { 1246 + updateStatusBatch(data).then((response) => {
747 if (response.code === 200) { 1247 if (response.code === 200) {
748 - this.msgSuccess( handle + "成功"); 1248 + this.msgSuccess(handle + "成功");
749 this.findAllFltData(); 1249 this.findAllFltData();
750 } else { 1250 } else {
751 this.msgError(response.msg); 1251 this.msgError(response.msg);
752 } 1252 }
753 }); 1253 });
754 - } 1254 + },
755 - 1255 + //多选框选中数据
756 - } 1256 + tableSelect(val) {
757 - }; 1257 + this.ids = val.selection.map((item) => item.id);
1258 + this.multiple = !val.selection.length;
1259 + },
1260 + //全选
1261 + tableSelectAll(val) {
1262 + this.ids = val.selection.map((item) => item.id);
1263 + this.multiple = !val.selection.length;
1264 + },
1265 + //分页
1266 + currentChange(val) {
1267 + this.queryParams.pageNum = val.page;
1268 + this.findAllFltData();
1269 + },
1270 + //排序
1271 + sortChange(val) {
1272 + console.log(val);
1273 + },
1274 + //每页长度
1275 + sizeChange(val) {
1276 + this.queryParams.limitSize = val;
1277 + this.findAllFltData();
1278 + },
1279 + },
1280 + deactivated() {
1281 + this.findAllFltDatList = [];
1282 + },
1283 +};
758 </script> 1284 </script>
1285 +
759 <style> 1286 <style>
760 - .el-table--striped .el-table__body tr.el-table__row--striped.current-row td, 1287 +.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
761 - .el-table__body tr.current-row>td { 1288 +.el-table__body tr.current-row > td {
762 background-color: #a0cfff; 1289 background-color: #a0cfff;
763 - } 1290 +}
764 1291
765 - .el-table--striped .el-table__body tr.hover-row.el-table__row--striped>td, 1292 +.el-table--striped .el-table__body tr.hover-row.el-table__row--striped > td,
766 - .el-table__body tr.hover-row>td { 1293 +.el-table__body tr.hover-row > td {
767 background-color: #d9ecff !important; 1294 background-color: #d9ecff !important;
768 - } 1295 +}
769 </style> 1296 </style>
......
...@@ -768,18 +768,19 @@ export default { ...@@ -768,18 +768,19 @@ export default {
768 }); 768 });
769 }, 769 },
770 770
771 - // activated(){ 771 + activated() {
772 - // findConditionData().then((res) => { 772 + if(this.$store.state.tagsView.cachedViews.length > 0 ){
773 - // if (res.code == 200) { 773 + this.$store.state.tagsView.cachedViews.forEach(item=>{
774 - // this.findConditionData = res.data; 774 + if(item === 'QueryCargo'){
775 - // } else { 775 + this.totalCount>0?this.select():''
776 - // this.$message({ 776 + }
777 - // message: "查询条件不存在", 777 + })
778 - // type: "warning", 778 + }
779 - // }); 779 + },
780 - // } 780 +
781 - // }); 781 + deactivated(){
782 - // }, 782 + this.tableData = []
783 + },
783 784
784 mounted() { 785 mounted() {
785 window.addEventListener("keydown", (code) => { 786 window.addEventListener("keydown", (code) => {
......
...@@ -120,6 +120,13 @@ export default { ...@@ -120,6 +120,13 @@ export default {
120 updated() { 120 updated() {
121 this.menuForm = this.menuData; 121 this.menuForm = this.menuData;
122 }, 122 },
123 + watch:{
124 + dialogVisible(val,oldVal){
125 + if(val){
126 + this.menuForm = this.menuData;
127 + }
128 + }
129 + },
123 methods: { 130 methods: {
124 handleClose() { 131 handleClose() {
125 this.$emit("handleClose", false); 132 this.$emit("handleClose", false);
......
...@@ -106,7 +106,7 @@ import dictLabels from "@/assets/languages/dictLabels.js"; ...@@ -106,7 +106,7 @@ import dictLabels from "@/assets/languages/dictLabels.js";
106 import Drawer from "./drawer.vue"; 106 import Drawer from "./drawer.vue";
107 import { MessageBox } from "element-ui"; 107 import { MessageBox } from "element-ui";
108 export default { 108 export default {
109 - name:"menuConfig", 109 + name:"MenuConfig",
110 components: { 110 components: {
111 Drawer, 111 Drawer,
112 }, 112 },
...@@ -163,6 +163,11 @@ export default { ...@@ -163,6 +163,11 @@ export default {
163 }; 163 };
164 }, 164 },
165 created() { 165 created() {
166 + if(this.$store.state.tagsView.cachedViews.length == 0){
167 + this.menuAll();
168 + }
169 + },
170 + activated(){
166 this.menuAll(); 171 this.menuAll();
167 }, 172 },
168 methods: { 173 methods: {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
26 v-model.trim="roleForm.name" 26 v-model.trim="roleForm.name"
27 :disabled="roleFormDisabled" 27 :disabled="roleFormDisabled"
28 v-if="!roleFormDisabled" 28 v-if="!roleFormDisabled"
29 + clearable
29 ></el-input> 30 ></el-input>
30 <div v-else>{{ roleData.name }}</div> 31 <div v-else>{{ roleData.name }}</div>
31 </el-form-item> 32 </el-form-item>
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
38 placeholder="请输入角色描述" 39 placeholder="请输入角色描述"
39 :disabled="roleFormDisabled" 40 :disabled="roleFormDisabled"
40 v-if="!roleFormDisabled" 41 v-if="!roleFormDisabled"
42 + clearable
41 ></el-input> 43 ></el-input>
42 <div v-else>{{ roleData.remark }}</div> 44 <div v-else>{{ roleData.remark }}</div>
43 </el-form-item> 45 </el-form-item>
...@@ -152,9 +154,11 @@ export default { ...@@ -152,9 +154,11 @@ export default {
152 roleFormDisabled(){ 154 roleFormDisabled(){
153 this.treeData = this.treeDisabled(this.treeData) 155 this.treeData = this.treeDisabled(this.treeData)
154 }, 156 },
155 - drawer(){ 157 + drawer(val,oldVal){
158 + if(val){
156 this.roleForm = this.roleData; 159 this.roleForm = this.roleData;
157 } 160 }
161 + }
158 }, 162 },
159 methods: { 163 methods: {
160 //关闭 164 //关闭
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
7 <el-input 7 <el-input
8 v-model="formData.name" 8 v-model="formData.name"
9 placeholder="请输入角色名称" 9 placeholder="请输入角色名称"
10 + clearable
10 ></el-input> 11 ></el-input>
11 </el-form-item> 12 </el-form-item>
12 </el-col> 13 </el-col>
...@@ -18,13 +19,14 @@ ...@@ -18,13 +19,14 @@
18 range-separator="至" 19 range-separator="至"
19 start-placeholder="开始日期" 20 start-placeholder="开始日期"
20 end-placeholder="结束日期" 21 end-placeholder="结束日期"
22 + clearable
21 > 23 >
22 </el-date-picker> 24 </el-date-picker>
23 </el-form-item> 25 </el-form-item>
24 </el-col> 26 </el-col>
25 <el-col :span="6"> 27 <el-col :span="6">
26 <el-form-item label="状态"> 28 <el-form-item label="状态">
27 - <el-select v-model="formData.valid" placeholder="角色状态"> 29 + <el-select v-model="formData.valid" placeholder="角色状态" clearable>
28 <el-option label="开启" value="1"> </el-option> 30 <el-option label="开启" value="1"> </el-option>
29 <el-option label="关闭" value="1"> </el-option> 31 <el-option label="关闭" value="1"> </el-option>
30 </el-select> 32 </el-select>
...@@ -32,7 +34,7 @@ ...@@ -32,7 +34,7 @@
32 </el-col> 34 </el-col>
33 </el-row> 35 </el-row>
34 </el-form> 36 </el-form>
35 - <div style="margin: 0 20px"> 37 + <div style="margin:20px">
36 <el-button 38 <el-button
37 type="primary" 39 type="primary"
38 icon="el-icon-search" 40 icon="el-icon-search"
...@@ -52,8 +54,10 @@ ...@@ -52,8 +54,10 @@
52 :totalCount="total" 54 :totalCount="total"
53 :limitSize="formData.size" 55 :limitSize="formData.size"
54 :page="formData.page" 56 :page="formData.page"
57 + :pageSizes="[20,30,40,50]"
55 :loading="tableLoading" 58 :loading="tableLoading"
56 height="600" 59 height="600"
60 + @sizeChange="sizeChange"
57 @currentChange="currentChange" 61 @currentChange="currentChange"
58 > 62 >
59 <template> 63 <template>
...@@ -188,6 +192,11 @@ export default { ...@@ -188,6 +192,11 @@ export default {
188 }; 192 };
189 }, 193 },
190 created() { 194 created() {
195 + if(this.$store.state.tagsView.cachedViews.length == 0){
196 + this.selectRoleList();
197 + }
198 + },
199 + activated(){
191 this.selectRoleList(); 200 this.selectRoleList();
192 }, 201 },
193 methods: { 202 methods: {
...@@ -351,6 +360,10 @@ export default { ...@@ -351,6 +360,10 @@ export default {
351 this.formData.page = val.page; 360 this.formData.page = val.page;
352 this.selectRoleList(); 361 this.selectRoleList();
353 }, 362 },
363 + sizeChange(val){
364 + this.formData.size = val;
365 + this.selectRoleList()
366 + }
354 }, 367 },
355 }; 368 };
356 </script> 369 </script>
......
1 <template> 1 <template>
2 <div class="userDrawer"> 2 <div class="userDrawer">
3 <el-drawer 3 <el-drawer
4 - :data="userData"
5 :title="drawerTitle" 4 :title="drawerTitle"
6 :visible.sync="drawer" 5 :visible.sync="drawer"
7 direction="rtl" 6 direction="rtl"
...@@ -25,7 +24,8 @@ ...@@ -25,7 +24,8 @@
25 v-model.trim="userForm.loginName" 24 v-model.trim="userForm.loginName"
26 v-if="!userFormDisabled" 25 v-if="!userFormDisabled"
27 :disabled="drawerTitle != '新增用户'" 26 :disabled="drawerTitle != '新增用户'"
28 - size="mini" 27 + size="small"
28 + clearable
29 ></el-input> 29 ></el-input>
30 <div v-else>{{ userForm.loginName }}</div> 30 <div v-else>{{ userForm.loginName }}</div>
31 </el-form-item> 31 </el-form-item>
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
37 :disabled="userFormDisabled" 37 :disabled="userFormDisabled"
38 v-model.trim="userForm.username" 38 v-model.trim="userForm.username"
39 v-if="!userFormDisabled" 39 v-if="!userFormDisabled"
40 - size="mini" 40 + size="small"
41 + clearable
41 ></el-input> 42 ></el-input>
42 <div v-else>{{ userForm.username }}</div> 43 <div v-else>{{ userForm.username }}</div>
43 </el-form-item> 44 </el-form-item>
...@@ -61,7 +62,8 @@ ...@@ -61,7 +62,8 @@
61 v-model.trim="userForm.phone" 62 v-model.trim="userForm.phone"
62 :disabled="userFormDisabled" 63 :disabled="userFormDisabled"
63 v-if="!userFormDisabled" 64 v-if="!userFormDisabled"
64 - size="mini" 65 + size="small"
66 + clearable
65 ></el-input> 67 ></el-input>
66 <div v-else>{{ userForm.phone }}</div> 68 <div v-else>{{ userForm.phone }}</div>
67 </el-form-item> 69 </el-form-item>
...@@ -74,7 +76,8 @@ ...@@ -74,7 +76,8 @@
74 v-model.trim="userForm.email" 76 v-model.trim="userForm.email"
75 :disabled="userFormDisabled" 77 :disabled="userFormDisabled"
76 v-if="!userFormDisabled" 78 v-if="!userFormDisabled"
77 - size="mini" 79 + size="small"
80 + clearable
78 ></el-input> 81 ></el-input>
79 <div v-else>{{ userForm.email }}</div> 82 <div v-else>{{ userForm.email }}</div>
80 </el-form-item> 83 </el-form-item>
...@@ -104,19 +107,11 @@ ...@@ -104,19 +107,11 @@
104 label="所属口岸:" 107 label="所属口岸:"
105 prop="portName" 108 prop="portName"
106 > 109 >
107 - <!-- <el-checkbox-group v-model="port" :disabled="userFormDisabled">
108 - <el-checkbox
109 - v-for="item in portNameList"
110 - :label="item.englishName"
111 - :key="item.id"
112 - >{{ item.englishName }}</el-checkbox
113 - >
114 - </el-checkbox-group> -->
115 <el-select 110 <el-select
116 placeholder="不限" 111 placeholder="不限"
117 v-model="port" 112 v-model="port"
118 :disabled="userFormDisabled" 113 :disabled="userFormDisabled"
119 - size="mini" 114 + size="small"
120 style="width: 100%" 115 style="width: 100%"
121 multiple 116 multiple
122 clearable 117 clearable
...@@ -155,7 +150,8 @@ ...@@ -155,7 +150,8 @@
155 placeholder="备注" 150 placeholder="备注"
156 :disabled="userFormDisabled" 151 :disabled="userFormDisabled"
157 v-if="!userFormDisabled" 152 v-if="!userFormDisabled"
158 - size="mini" 153 + size="small"
154 + clearable
159 ></el-input> 155 ></el-input>
160 <div v-else>{{ userForm.remark }}</div> 156 <div v-else>{{ userForm.remark }}</div>
161 </el-form-item> 157 </el-form-item>
...@@ -266,9 +262,11 @@ export default { ...@@ -266,9 +262,11 @@ export default {
266 getRoleList({ size: null, page: null }) 262 getRoleList({ size: null, page: null })
267 .then((res) => { 263 .then((res) => {
268 if (res.code === 200) { 264 if (res.code === 200) {
265 + res.data.list.map(item=>{
269 if(item.valid == 1){ 266 if(item.valid == 1){
270 this.roleList.push(item) 267 this.roleList.push(item)
271 } 268 }
269 + })
272 } else { 270 } else {
273 this.$message({ 271 this.$message({
274 message: res.msg, 272 message: res.msg,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
7 <el-input 7 <el-input
8 placeholder="请输入用户名称" 8 placeholder="请输入用户名称"
9 v-model="formData.username" 9 v-model="formData.username"
10 + clearable
10 ></el-input> 11 ></el-input>
11 </el-form-item> 12 </el-form-item>
12 </el-col> 13 </el-col>
...@@ -15,12 +16,13 @@ ...@@ -15,12 +16,13 @@
15 <el-input 16 <el-input
16 placeholder="请输入用户名称" 17 placeholder="请输入用户名称"
17 v-model="formData.phone" 18 v-model="formData.phone"
19 + clearable
18 ></el-input> 20 ></el-input>
19 </el-form-item> 21 </el-form-item>
20 </el-col> 22 </el-col>
21 <el-col :span="6"> 23 <el-col :span="6">
22 <el-form-item label="状态"> 24 <el-form-item label="状态">
23 - <el-select placeholder="用户状态" v-model="formData.isValid"> 25 + <el-select placeholder="用户状态" v-model="formData.isValid" clearable>
24 <el-option label="开启" value="1"> </el-option> 26 <el-option label="开启" value="1"> </el-option>
25 <el-option label="关闭" value="2"> </el-option> 27 <el-option label="关闭" value="2"> </el-option>
26 </el-select> 28 </el-select>
...@@ -48,7 +50,9 @@ ...@@ -48,7 +50,9 @@
48 :totalCount="total" 50 :totalCount="total"
49 :loading="loading" 51 :loading="loading"
50 :page="formData.page" 52 :page="formData.page"
53 + :pageSizes="[20,30,40,50]"
51 height="600" 54 height="600"
55 + @sizeChange="sizeChange"
52 @currentChange="currentChange" 56 @currentChange="currentChange"
53 > 57 >
54 <template> 58 <template>
...@@ -236,6 +240,11 @@ export default { ...@@ -236,6 +240,11 @@ export default {
236 }; 240 };
237 }, 241 },
238 created() { 242 created() {
243 + if(this.$store.state.tagsView.cachedViews.length == 0){
244 + this.selectUser();
245 + }
246 + },
247 + activated(){
239 this.selectUser(); 248 this.selectUser();
240 }, 249 },
241 methods: { 250 methods: {
...@@ -376,6 +385,11 @@ export default { ...@@ -376,6 +385,11 @@ export default {
376 this.formData.page = val.page; 385 this.formData.page = val.page;
377 this.selectUser(); 386 this.selectUser();
378 }, 387 },
388 +
389 + sizeChange(val){
390 + this.formData.size = val;
391 + this.selectUser()
392 + }
379 }, 393 },
380 }; 394 };
381 </script> 395 </script>
......