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-option label="不在用" value="N"></el-option>
</el-select> </el-select>
</el-form-item> </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-button>
</el-form> </el-form>
@ -78,7 +78,8 @@ export default {
param1: '', param1: '',
param2: '', param2: '',
param3: '', param3: '',
param4: '',
param: '',
param4: this.$store.state.user.site,
dataList: [], dataList: [],
baseListData: { baseListData: {
caption1: '', caption1: '',
@ -90,14 +91,16 @@ export default {
fieldname2: '', fieldname2: '',
sqlcode: '', sqlcode: '',
tagno: '', tagno: '',
}
},
defaultParam: false
} }
}, },
methods: { methods: {
// //
init(tagNo) {
init(tagNo,param) {
this.visible = true; this.visible = true;
this.param = param
// tagNo // tagNo
getChooselist({"tagNo": tagNo}).then(({data}) => { getChooselist({"tagNo": tagNo}).then(({data}) => {
this.columnList = [] this.columnList = []
@ -140,11 +143,16 @@ export default {
} }
this.columnList.push(column) this.columnList.push(column)
}) })
this.getDataList(true)
}) })
this.dataListLoading = false this.dataListLoading = false
}, },
getDataList() {
getDataList(bool) {
let sql = this.baseListData.sqlcode 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) { if (this.param1) {
sql += " and " + this.baseListData.fieldname1 + " like '%" + 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> <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 <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
:title="'设置语言一'+querySysLanguagePack.languageCode" :visible.sync="addLanguage" width="1000px"> :title="'设置语言一'+querySysLanguagePack.languageCode" :visible.sync="addLanguage" width="1000px">
@ -134,7 +134,7 @@
<script> <script>
import column from "../../common/column"; import column from "../../common/column";
import list from '../../common/list'
import list from '@/views/modules/common/Chooselist'
import { import {
searchSysLanguagePackList, searchSysLanguagePackList,
searchSysLanguageParam, searchSysLanguageParam,
@ -160,11 +160,11 @@ import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/user
export default { export default {
components: { components: {
column, column,
list
Chooselist
}, },
data() { data() {
return { return {
listShow:false,
listShow: false,
// table // table
height: 450, height: 450,
// //
@ -504,7 +504,7 @@ export default {
// //
getBaseList(){ getBaseList(){
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.baseList.init(3)
this.$refs.baseList.init(3,'fdsa')
}) })
}, },
// //

Loading…
Cancel
Save