lr 左侧筛选项

master
lion 1 year ago
parent cffc3b996b
commit 96420c83e2

@ -2,9 +2,9 @@
ENV='development' ENV='development'
# base api # base api
VUE_APP_BASE_API = https://saifen.ali251.langye.net #VUE_APP_BASE_API = https://saifen.ali251.langye.net
VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file #VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview #VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview
#VUE_APP_BASE_API = https://sepax-pdm-test.langye.net VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
#VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file

@ -28,7 +28,7 @@
Organization Organization
</template> </template>
<div> <div>
{{person_info.organization}} {{person_info.origination}}
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :span="2"> <el-descriptions-item :span="2">

@ -29,8 +29,8 @@
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.status"> <el-select style="width:100%" v-model="form.status">
<el-option label="yes" value="1"></el-option> <el-option label="yes" :value="1"></el-option>
<el-option label="no" value="0"></el-option> <el-option label="no" :value="0"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -132,7 +132,7 @@
form: { form: {
number: "", number: "",
name: "", name: "",
status: "1", status:1,
sort: 0, sort: 0,
remark: "", remark: "",
detail_list: [{ detail_list: [{
@ -250,6 +250,7 @@
}).then(res => { }).then(res => {
this.form = this.base.requestToForm(res, this.form) this.form = this.base.requestToForm(res, this.form)
this.form.detail_list = res.detail this.form.detail_list = res.detail
this.form.status = res.status?res.status:0
}) })
} }
}, },
@ -265,7 +266,7 @@
this.form = { this.form = {
number: "", number: "",
name: "", name: "",
status: "1", status: 1,
sort: 0, sort: 0,
remark: "", remark: "",
detail_list: [{ detail_list: [{

@ -215,7 +215,7 @@
created() { created() {
this.uploadOther.token = getToken(); this.uploadOther.token = getToken();
this.getCategoryList() this.getCategoryList()
this.getProductList() // this.getProductList()
this.getApplicationList() this.getApplicationList()
// this.getAppSpecial() // this.getAppSpecial()
}, },

@ -9,6 +9,12 @@
<div> <div>
<el-input v-model="select.title" placeholder="Title"></el-input> <el-input v-model="select.title" placeholder="Title"></el-input>
</div> </div>
<div>
<el-select clearable style="width:100%" filterable v-model="select.number" placeholder="Product Phase">
<el-option v-for="(item,index) in productList" :key="index" :label="item.number" :value="item.id">
</el-option>
</el-select>
</div>
<div> <div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button> <el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
</div> </div>
@ -24,13 +30,14 @@
</lx-header> </lx-header>
</div> </div>
</div> </div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" <xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
@pageSizeChange="pageSizeChange" :table-item="table_item"> :table-item="table_item">
<template v-slot:btns> <template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="180" header-align="center"> <el-table-column align='center' fixed="right" label="Operate" width="180" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" @click="editLr('editor',scope.row.id)">edit</el-button> <el-button type="primary" size="small" @click="editLr('editor',scope.row.id)">edit</el-button>
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="Are you sure to delete it?"> <el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
@confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-button type="danger" size="small" slot="reference">delete</el-button> <el-button type="danger" size="small" slot="reference">delete</el-button>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -47,6 +54,9 @@
index, index,
destroy destroy
} from "@/api/system/baseForm.js" } from "@/api/system/baseForm.js"
import {
index as getProduct
} from "@/api/product/index.js"
export default { export default {
components: { components: {
addLr addLr
@ -55,14 +65,16 @@
return { return {
select: { select: {
title: '', title: '',
table_name:'literature_references', table_name: 'literature_references',
number:'',
page: 1, page: 1,
page_size: 10, page_size: 10,
sort_name:"year", sort_name: "year",
sort_type:"DESC", sort_type: "DESC",
sort_name2:"date", sort_name2: "date",
sort_type2:"DESC", sort_type2: "DESC",
}, },
productList:[],
total: 0, total: 0,
list: [], list: [],
table_item: [{ table_item: [{
@ -73,23 +85,23 @@
prop: 'year', prop: 'year',
label: 'Year', label: 'Year',
align: 'left', align: 'left',
width:120, width: 120,
}, { }, {
prop: 'title', prop: 'title',
label: 'Title', label: 'Title',
align: 'left', align: 'left',
width:480, width: 480,
}, },
{ {
prop: 'link', prop: 'link',
label: 'Link', label: 'Link',
align: 'left', align: 'left',
width:480, width: 480,
},{ }, {
prop: 'date', prop: 'date',
label: 'Release Time', label: 'Release Time',
align: 'left', align: 'left',
width:180 width: 180
}, },
// { // {
// prop: 'date', // prop: 'date',
@ -101,7 +113,7 @@
prop: 'admin.name', prop: 'admin.name',
label: 'Creator', label: 'Creator',
align: 'left', align: 'left',
width:180 width: 180
} }
] ]
@ -109,12 +121,21 @@
}, },
created() { created() {
this.getList() this.getList()
this.getProductList()
}, },
methods: { methods: {
async getProductList() {
const res = await getProduct({
page_size: 9999,
page: 1
})
this.productList = res.data
},
editLr(type, id) { editLr(type, id) {
if (type == 'editor') { if (type == 'editor') {
this.$refs.addLr.id = id this.$refs.addLr.id = id
} }
this.$refs.addLr.productList = this.productList
this.$refs.addLr.type = type this.$refs.addLr.type = type
this.$refs.addLr.isShow = true this.$refs.addLr.isShow = true
}, },
@ -135,10 +156,14 @@
async getList() { async getList() {
const res = await index({ const res = await index({
...this.select, ...this.select,
filter:[{ filter: [{
key:'title', key: 'title',
op:'like', op: 'like',
value:this.select.title value: this.select.title
},{
key: 'product_numbers',
op: 'like',
value: this.select.number
}] }]
}) })
this.list = res.data this.list = res.data
@ -147,8 +172,8 @@
deleteList(id) { deleteList(id) {
var that = this; var that = this;
destroy({ destroy({
table_name:this.select.table_name, table_name: this.select.table_name,
id:id id: id
}).then(response => { }).then(response => {
this.$Message.success('Success'); this.$Message.success('Success');
this.getList() this.getList()

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin', outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin_test',
assetsDir: 'static', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save