Elements-SY

modify

...@@ -161,7 +161,6 @@ export default { ...@@ -161,7 +161,6 @@ export default {
161 this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1] 161 this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
162 .children[0].clientHeight; 162 .children[0].clientHeight;
163 this.trHeight = trEl; 163 this.trHeight = trEl;
164 - // console.log(this);
165 }); 164 });
166 }, 800), 165 }, 800),
167 166
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
53 :disabled="scope.row.edit | isEdit" 53 :disabled="scope.row.edit | isEdit"
54 min="-7" 54 min="-7"
55 max="7" 55 max="7"
56 - v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')" 56 + v-input-filter
57 clearable 57 clearable
58 placeholder="" 58 placeholder=""
59 /> 59 />
...@@ -417,6 +417,36 @@ export default { ...@@ -417,6 +417,36 @@ export default {
417 this.PostFindDestinationFltRuleByFlightNo(); 417 this.PostFindDestinationFltRuleByFlightNo();
418 }, 418 },
419 mounted() {}, 419 mounted() {},
420 + directives: {
421 + "input-filter": {
422 + bind: function (el, binding) {
423 + el.handler = function (event) {
424 + let regExp = /[^0-9a-zA-Z_]/g;
425 + let newValue = event.target.value.replace(regExp, "");
426 + if (newValue !== event.target.value) {
427 + event.target.value = newValue;
428 + event.target.dispatchEvent(new Event("input"));
429 + }
430 + };
431 + el.addEventListener("input", el.handler);
432 + },
433 + unbind: function (el) {
434 + el.removeEventListener("input", el.handler);
435 + },
436 + /*
437 + -7 +7
438 + 0~7
439 + 或者 空
440 + 不能输入小数点
441 + Math.abs(-7);
442 + 不能输入和选择未来日期,
443 + 不能输入和选择历史日期,
444 + 选择时间范围,
445 + 只能输入四位正整数,不能够有小数点,
446 + 只能输入四位正整数保留3位小数,
447 + */
448 + },
449 + },
420 filters: { 450 filters: {
421 isEdit: function (value) { 451 isEdit: function (value) {
422 switch (value) { 452 switch (value) {
...@@ -467,8 +497,8 @@ export default { ...@@ -467,8 +497,8 @@ export default {
467 list.map((item) => { 497 list.map((item) => {
468 routeList.push(item); 498 routeList.push(item);
469 }); 499 });
470 - let isEtesRoute = list.filter(item=>item.isEtesRoute == "Y"); // 过滤普通航线 500 + let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线
471 - if(isEtesRoute.length == 0){ 501 + if (isEtesRoute.length == 0) {
472 this.msgError("该航班下的航线均为普通航线"); 502 this.msgError("该航班下的航线均为普通航线");
473 } 503 }
474 this.tableData[this.currentIndex].fltRoute = ""; 504 this.tableData[this.currentIndex].fltRoute = "";
......
...@@ -33,7 +33,6 @@ export default { ...@@ -33,7 +33,6 @@ export default {
33 } 33 }
34 }, 34 },
35 created() { 35 created() {
36 - console.log(this.$route)
37 this.tableData = this.$route.query.data 36 this.tableData = this.$route.query.data
38 this.fromRoute = this.$route.query.from 37 this.fromRoute = this.$route.query.from
39 }, 38 },
...@@ -55,4 +54,4 @@ export default { ...@@ -55,4 +54,4 @@ export default {
55 } 54 }
56 </script> 55 </script>
57 56
58 -<style lang="scss" scoped></style>
...\ No newline at end of file ...\ No newline at end of file
57 +<style lang="scss" scoped></style>
......
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
85 roleFormDisabled: false, 85 roleFormDisabled: false,
86 tableLoading: false, 86 tableLoading: false,
87 total: 0, 87 total: 0,
88 - tableHeight: null 88 + tableHeight: 300
89 }; 89 };
90 }, 90 },
91 created() { 91 created() {
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
94 } 94 }
95 }, 95 },
96 mounted() { 96 mounted() {
97 - this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250 97 + // this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
98 }, 98 },
99 activated() { 99 activated() {
100 this.selectRoleList(); 100 this.selectRoleList();
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{ 44 v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{
45 scope.row.isValid == 1 ? "停用" : "启用" 45 scope.row.isValid == 1 ? "停用" : "启用"
46 }}</el-button> 46 }}</el-button>
47 - <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']" style="margin-top: 5px;margin-left: 0;">删除用户 47 + <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户
48 </el-button> 48 </el-button>
49 </template> 49 </template>
50 </el-table-column> 50 </el-table-column>
......