Browse Source

基础数据列表 sxm 2022-1-6

master
[li_she] 4 years ago
parent
commit
ee0894dce9
  1. 18
      src/views/modules/common/Chooselist.vue
  2. 10
      src/views/modules/sys/language/common.vue

18
src/views/modules/common/list.vue → src/views/modules/common/Chooselist.vue

@ -23,7 +23,7 @@
<el-option label="不在用" value="N"></el-option>
</el-select>
</el-form-item>
<el-button style="margin-top: 18px" type="primary" @click="getDataList()">查询
<el-button style="margin-top: 18px" type="primary" @click="getDataList(false)">查询
</el-button>
</el-form>
@ -78,7 +78,8 @@ export default {
param1: '',
param2: '',
param3: '',
param4: '',
param: '',
param4: this.$store.state.user.site,
dataList: [],
baseListData: {
caption1: '',
@ -90,14 +91,16 @@ export default {
fieldname2: '',
sqlcode: '',
tagno: '',
}
},
defaultParam: false
}
},
methods: {
//
init(tagNo) {
init(tagNo,param) {
this.visible = true;
this.param = param
// tagNo
getChooselist({"tagNo": tagNo}).then(({data}) => {
this.columnList = []
@ -140,11 +143,16 @@ export default {
}
this.columnList.push(column)
})
this.getDataList(true)
})
this.dataListLoading = false
},
getDataList() {
getDataList(bool) {
let sql = this.baseListData.sqlcode
if (bool){
sql += " and (" + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR "+this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) "
}
if (this.param1) {
sql += " and " + this.baseListData.fieldname1 + " like '%" + this.param1 + "%'"
}

10
src/views/modules/sys/language/common.vue

@ -82,7 +82,7 @@
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<list ref="baseList" @getBaseData="getBaseData"></list>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
:title="'设置语言一'+querySysLanguagePack.languageCode" :visible.sync="addLanguage" width="1000px">
@ -134,7 +134,7 @@
<script>
import column from "../../common/column";
import list from '../../common/list'
import list from '@/views/modules/common/Chooselist'
import {
searchSysLanguagePackList,
searchSysLanguageParam,
@ -160,11 +160,11 @@ import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/user
export default {
components: {
column,
list
Chooselist
},
data() {
return {
listShow:false,
listShow: false,
// table
height: 450,
//
@ -504,7 +504,7 @@ export default {
//
getBaseList(){
this.$nextTick(() => {
this.$refs.baseList.init(3)
this.$refs.baseList.init(3,'fdsa')
})
},
//

Loading…
Cancel
Save