|
@@ -4,11 +4,11 @@
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
<a-row :gutter="24">
|
|
|
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="设备名称">
|
|
|
<j-search-select-tag v-model="queryParam.equipmentid" placeholder="请选择设备" dict="tpm_equipment,equipmentname,id" />
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="点位名">
|
|
|
<j-search-select-tag v-model="queryParam.tagname" placeholder="请选择点位" dict="tpm_tag,tagname,tagname" />
|
|
@@ -126,8 +126,8 @@
|
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
|
|
-import TagModal from './modules/TagModal.vue'
|
|
|
-import TagModalPL from './modulesPL/TagModalPL.vue'
|
|
|
+ import TagModal from './modules/TagModal.vue'
|
|
|
+ import TagModalPL from './modulesPL/TagModalPL.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'TagList',
|
|
@@ -136,9 +136,19 @@ import TagModalPL from './modulesPL/TagModalPL.vue'
|
|
|
TagModal,
|
|
|
TagModalPL
|
|
|
},
|
|
|
+ props: {
|
|
|
+ selectData: {
|
|
|
+ type: Object,
|
|
|
+ default: function(){
|
|
|
+ return {} // 使用工厂函数返回默认值
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
description: '设备点位表管理页面',
|
|
|
+ // 查询参数
|
|
|
+ queryParam: {},
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{
|
|
@@ -255,6 +265,41 @@ import TagModalPL from './modulesPL/TagModalPL.vue'
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadData(arg) {
|
|
|
+ if(!this.url.list){
|
|
|
+ this.$message.error("请设置url.list属性!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //加载数据 若传入参数1则加载第一页的内容
|
|
|
+ if (arg === 1) {
|
|
|
+ this.ipagination.current = 1;
|
|
|
+ }
|
|
|
+ var params = this.getQueryParams();//查询条件
|
|
|
+ this.loading = true;
|
|
|
+ getAction(this.url.list, params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
+ this.dataSource = res.result.records||res.result;
|
|
|
+ if(res.result.total)
|
|
|
+ {
|
|
|
+ this.ipagination.total = res.result.total;
|
|
|
+ }else{
|
|
|
+ this.ipagination.total = 0;
|
|
|
+ }
|
|
|
+ //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 处理父组件传过来的数据
|
|
|
+ getDataList(){
|
|
|
+ // console.log(111,this.selectData)
|
|
|
+ this.queryParam.equipmentid = this.selectData.id
|
|
|
+ this.loadData()
|
|
|
+ },
|
|
|
initDictConfig(){
|
|
|
},
|
|
|
getSuperFieldList(){
|
|
@@ -280,6 +325,7 @@ import TagModalPL from './modulesPL/TagModalPL.vue'
|
|
|
this.$refs.modalFormPL.disableSubmit = false;
|
|
|
this.$refs.modalFormPL.visible = true;
|
|
|
},
|
|
|
+ // 获取点位
|
|
|
getPointOptions() {
|
|
|
getAction(this.url.getPoint, this.queryParam).then((res) => {
|
|
|
this.pointOptions = res.result.map(item => {
|