优化维修页面表格复选框问题
This commit is contained in:
parent
8027d196b2
commit
f7ee959421
|
|
@ -366,6 +366,11 @@
|
|||
width="55"
|
||||
align="center"
|
||||
v-if="repairTitle === '维修'"
|
||||
:selectable="
|
||||
(row) => {
|
||||
return row.status == 1
|
||||
}
|
||||
"
|
||||
/>
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
:placeholder="placeholder"
|
||||
ref="select"
|
||||
:filterable="true"
|
||||
:remote="true"
|
||||
:remote-method="remoteMethod"
|
||||
:clearable="clearable"
|
||||
@clear="clearSelect"
|
||||
@visible-change="visibleChange"
|
||||
|
|
@ -51,21 +49,21 @@ export default {
|
|||
name: 'index',
|
||||
props: {
|
||||
treeList: {
|
||||
type: Array
|
||||
type: Array,
|
||||
}, //树形原始数据
|
||||
treeProps: Object, //树形配置
|
||||
nodeKey: String, //树形唯一键值
|
||||
defaultSelect: {
|
||||
//默认选择
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
defaultData: {
|
||||
type: Object,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
clearable: { type: Boolean, default: false },
|
||||
placeholder: { type: String, default: '请选择' }
|
||||
placeholder: { type: String, default: '请选择' },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -73,7 +71,7 @@ export default {
|
|||
value: '',
|
||||
filterText: '',
|
||||
currentKey: '',
|
||||
highlightNode: -1
|
||||
highlightNode: -1,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -81,10 +79,9 @@ export default {
|
|||
// console.log('val-----', val);
|
||||
// },
|
||||
clearable: {
|
||||
handler: function(val,old) {
|
||||
},
|
||||
handler: function (val, old) {},
|
||||
// 立即以obj.name的当前值触发回调
|
||||
immediate: true
|
||||
immediate: true,
|
||||
},
|
||||
filterText(val) {
|
||||
this.$refs.selectTree.filter(val)
|
||||
|
|
@ -98,9 +95,12 @@ export default {
|
|||
if (val.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
if (this.defaultSelect) {
|
||||
this.value = val[0][this.treeProps.children][0][this.nodeKey]
|
||||
this.value =
|
||||
val[0][this.treeProps.children][0][this.nodeKey]
|
||||
this.textStr =
|
||||
val[0][this.treeProps.children][0][this.treeProps.label]
|
||||
val[0][this.treeProps.children][0][
|
||||
this.treeProps.label
|
||||
]
|
||||
this.highlightNode = this.value
|
||||
this.currentKey = this.value
|
||||
this.$refs.selectTree.setCurrentKey(this.highlightNode)
|
||||
|
|
@ -108,7 +108,7 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
setEdit(obj) {
|
||||
|
|
@ -174,45 +174,44 @@ export default {
|
|||
this.textStr = ''
|
||||
this.$refs.selectTree.setCurrentKey()
|
||||
this.$emit('handleNodeClick', '')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user-select-tree {
|
||||
::v-deep {
|
||||
.el-icon-::before {
|
||||
content: '\ea1b';
|
||||
font-family: 'icomoon' !important;
|
||||
display: inline-block;
|
||||
-webkit-transform: scale(0.83);
|
||||
font-size: 10px;
|
||||
//width: 100%;
|
||||
//height: 100%;
|
||||
color: #666666;
|
||||
pointer-events: none;
|
||||
}
|
||||
// ::v-deep {
|
||||
// .el-icon-::before {
|
||||
// content: '\ea1b';
|
||||
// font-family: 'icomoon' !important;
|
||||
// display: inline-block;
|
||||
// -webkit-transform: scale(0.83);
|
||||
// font-size: 10px;
|
||||
// //width: 100%;
|
||||
// //height: 100%;
|
||||
// color: #666666;
|
||||
// pointer-events: none;
|
||||
// }
|
||||
|
||||
.el-input.is-focus {
|
||||
.el-icon- {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
// .el-input.is-focus {
|
||||
// .el-icon- {
|
||||
// transform: rotate(0deg);
|
||||
// }
|
||||
// }
|
||||
|
||||
.el-input__inner {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
// .el-input__inner {
|
||||
// height: 36px;
|
||||
// line-height: 36px;
|
||||
// }
|
||||
|
||||
.el-input__icon {
|
||||
line-height: 36px;
|
||||
}
|
||||
// .el-input__icon {
|
||||
// line-height: 36px;
|
||||
// }
|
||||
|
||||
.el-tree-node__content {
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
// .el-tree-node__content {
|
||||
// height: 32px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -377,6 +377,11 @@
|
|||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
:selectable="
|
||||
(row) => {
|
||||
return row.status == 1
|
||||
}
|
||||
"
|
||||
v-if="repairTitle === '维修'"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
:placeholder="placeholder"
|
||||
ref="select"
|
||||
:filterable="true"
|
||||
:remote="true"
|
||||
:remote-method="remoteMethod"
|
||||
:clearable="clearable"
|
||||
@clear="clearSelect"
|
||||
@visible-change="visibleChange"
|
||||
|
|
@ -51,21 +49,21 @@ export default {
|
|||
name: 'index',
|
||||
props: {
|
||||
treeList: {
|
||||
type: Array
|
||||
type: Array,
|
||||
}, //树形原始数据
|
||||
treeProps: Object, //树形配置
|
||||
nodeKey: String, //树形唯一键值
|
||||
defaultSelect: {
|
||||
//默认选择
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
defaultData: {
|
||||
type: Object,
|
||||
default: null
|
||||
default: null,
|
||||
},
|
||||
clearable: { type: Boolean, default: false },
|
||||
placeholder: { type: String, default: '请选择' }
|
||||
placeholder: { type: String, default: '请选择' },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -73,7 +71,7 @@ export default {
|
|||
value: '',
|
||||
filterText: '',
|
||||
currentKey: '',
|
||||
highlightNode: -1
|
||||
highlightNode: -1,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -81,10 +79,9 @@ export default {
|
|||
// console.log('val-----', val);
|
||||
// },
|
||||
clearable: {
|
||||
handler: function(val,old) {
|
||||
},
|
||||
handler: function (val, old) {},
|
||||
// 立即以obj.name的当前值触发回调
|
||||
immediate: true
|
||||
immediate: true,
|
||||
},
|
||||
filterText(val) {
|
||||
this.$refs.selectTree.filter(val)
|
||||
|
|
@ -98,9 +95,12 @@ export default {
|
|||
if (val.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
if (this.defaultSelect) {
|
||||
this.value = val[0][this.treeProps.children][0][this.nodeKey]
|
||||
this.value =
|
||||
val[0][this.treeProps.children][0][this.nodeKey]
|
||||
this.textStr =
|
||||
val[0][this.treeProps.children][0][this.treeProps.label]
|
||||
val[0][this.treeProps.children][0][
|
||||
this.treeProps.label
|
||||
]
|
||||
this.highlightNode = this.value
|
||||
this.currentKey = this.value
|
||||
this.$refs.selectTree.setCurrentKey(this.highlightNode)
|
||||
|
|
@ -108,7 +108,7 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
setEdit(obj) {
|
||||
|
|
@ -174,45 +174,44 @@ export default {
|
|||
this.textStr = ''
|
||||
this.$refs.selectTree.setCurrentKey()
|
||||
this.$emit('handleNodeClick', '')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user-select-tree {
|
||||
::v-deep {
|
||||
.el-icon-::before {
|
||||
content: '\ea1b';
|
||||
font-family: 'icomoon' !important;
|
||||
display: inline-block;
|
||||
-webkit-transform: scale(0.83);
|
||||
font-size: 10px;
|
||||
//width: 100%;
|
||||
//height: 100%;
|
||||
color: #666666;
|
||||
pointer-events: none;
|
||||
}
|
||||
// ::v-deep {
|
||||
// .el-icon-::before {
|
||||
// content: '\ea1b';
|
||||
// font-family: 'icomoon' !important;
|
||||
// display: inline-block;
|
||||
// -webkit-transform: scale(0.83);
|
||||
// font-size: 10px;
|
||||
// //width: 100%;
|
||||
// //height: 100%;
|
||||
// color: #666666;
|
||||
// pointer-events: none;
|
||||
// }
|
||||
|
||||
.el-input.is-focus {
|
||||
.el-icon- {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
// .el-input.is-focus {
|
||||
// .el-icon- {
|
||||
// transform: rotate(0deg);
|
||||
// }
|
||||
// }
|
||||
|
||||
.el-input__inner {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
// .el-input__inner {
|
||||
// height: 36px;
|
||||
// line-height: 36px;
|
||||
// }
|
||||
|
||||
.el-input__icon {
|
||||
line-height: 36px;
|
||||
}
|
||||
// .el-input__icon {
|
||||
// line-height: 36px;
|
||||
// }
|
||||
|
||||
.el-tree-node__content {
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
// .el-tree-node__content {
|
||||
// height: 32px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@
|
|||
<el-table-column align="center" label="文件名称" prop="name" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<a :href="`${filePreviewUrl}${row.url}`" target="_blank"
|
||||
<a
|
||||
:href="`${filePreviewUrl}${row.url}`"
|
||||
target="_blank"
|
||||
:download="row.name"
|
||||
>查看</a
|
||||
>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||
// target: `https://z.csgmall.com.cn`,
|
||||
|
||||
target: `http://192.168.2.167:28080`, //超
|
||||
target: `http://192.168.2.134:28080`, //超
|
||||
// target: `http://10.40.92.81:28080`, //韩/
|
||||
// target: `http://10.40.92.74:8080`,//旭/
|
||||
// target: `http://192.168.2.248:28080`, //帅
|
||||
|
|
|
|||
Loading…
Reference in New Issue