Browse Source

收藏夹+demo

master
ruanqi 2 years ago
parent
commit
6c1a852523
  1. 4
      src/main.js
  2. 36
      src/views/common/selectDiv.vue
  3. 32
      src/views/common/yzz.vue
  4. 25
      src/views/modules/sampleManagement/technicalSpecificationList/technicalSpecificationList.vue

4
src/main.js

@ -18,13 +18,13 @@ import decimalUtil from '@/utils/decimalUtil.js'
import getLodop from '@/utils/LodopFuncs.js' import getLodop from '@/utils/LodopFuncs.js'
import pdf from 'vue-pdf' import pdf from 'vue-pdf'
import { debounce,throttle} from '@/utils/common.js' import { debounce,throttle} from '@/utils/common.js'
import yzz from '@/views/common/yzz.vue'
import selectDiv from '@/views/common/selectDiv.vue'
Vue.component('downloadExcel', JsonExcel) Vue.component('downloadExcel', JsonExcel)
Vue.component('pdf', pdf) Vue.component('pdf', pdf)
Vue.use(VueCookie) Vue.use(VueCookie)
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.component('yzz', yzz);
Vue.component('selectDiv', selectDiv);
// 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock // 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {

36
src/views/common/selectDiv.vue

@ -0,0 +1,36 @@
<template>
<div class="mod-config">
<div style="float:left; margin-top: 10px; font-size: 13px">
<label style="color: gray"></label>
<label style="color: #17B3A3">{{ length1 }}</label>
<label style="color: gray"> </label>
<label style="color: #17B3A3">{{ length2 }}</label>
<label style="color: gray"> </label>
</div>
</div>
</template>
<script>
export default {
name: 'yzz',
data () {
return {
length1:0,
length2:0,
}
},
methods: {
setLengthAll(num){
this.length1=num
},
setLengthselected(num){
this.length2=num
},
},
}
</script>
<style scoped>
</style>

32
src/views/common/yzz.vue

@ -1,32 +0,0 @@
<template>
<div class="tag">
<span class="tag-label">大傻逼</span>
</div>
</template>
<script>
export default {
name: 'yzz',
props: {
label: {
type: String,
required: true
}
}
}
</script>
<style scoped>
.tag {
display: inline-block;
background-color: #007bff;
color: #fff;
border-radius: 4px;
padding: 4px 8px;
margin-right: 8px;
}
.tag-label {
font-size: 14px;
}
</style>

25
src/views/modules/sampleManagement/technicalSpecificationList/technicalSpecificationList.vue

@ -63,6 +63,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<selectDiv ref="selectDiv"></selectDiv>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -449,17 +450,19 @@
this.search() this.search()
}, },
search(){ search(){
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
technicalSpecificationListSearch(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList1 = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
// this.searchData.limit = this.pageSize
// this.searchData.page = this.pageIndex
// technicalSpecificationListSearch(this.searchData).then(({data}) => {
// if (data.code == 0) {
// this.dataList1 = data.page.list
// this.pageIndex = data.page.currPage
// this.pageSize = data.page.pageSize
// this.totalPage = data.page.totalCount
// }
// this.dataListLoading = false
// })
this.$refs.selectDiv.setLengthAll(3)
this.$refs.selectDiv.setLengthselected(2)
}, },
// S // S
getBaseList (val, type) { getBaseList (val, type) {

Loading…
Cancel
Save