lr 左侧筛选项

master
lion 9 months ago
parent cffc3b996b
commit 96420c83e2

@ -2,9 +2,9 @@
ENV='development'
# base api
VUE_APP_BASE_API = https://saifen.ali251.langye.net
VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
#VUE_APP_BASE_API = https://saifen.ali251.langye.net
#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_BASE_API = https://sepax-pdm-test.langye.net
#VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file
VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file

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

@ -29,8 +29,8 @@
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.status">
<el-option label="yes" value="1"></el-option>
<el-option label="no" value="0"></el-option>
<el-option label="yes" :value="1"></el-option>
<el-option label="no" :value="0"></el-option>
</el-select>
</div>
</div>
@ -132,7 +132,7 @@
form: {
number: "",
name: "",
status: "1",
status:1,
sort: 0,
remark: "",
detail_list: [{
@ -249,7 +249,8 @@
id: this.id
}).then(res => {
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 = {
number: "",
name: "",
status: "1",
status: 1,
sort: 0,
remark: "",
detail_list: [{

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

@ -9,6 +9,12 @@
<div>
<el-input v-model="select.title" placeholder="Title"></el-input>
</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>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
</div>
@ -24,13 +30,14 @@
</lx-header>
</div>
</div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="180" header-align="center">
<template slot-scope="scope">
<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-popconfirm>
</template>
@ -43,10 +50,13 @@
<script>
import addLr from './components/addLr.vue';
import {
index,
destroy
import {
index,
destroy
} from "@/api/system/baseForm.js"
import {
index as getProduct
} from "@/api/product/index.js"
export default {
components: {
addLr
@ -54,15 +64,17 @@
data() {
return {
select: {
title: '',
table_name:'literature_references',
title: '',
table_name: 'literature_references',
number:'',
page: 1,
page_size: 10,
sort_name:"year",
sort_type:"DESC",
sort_name2:"date",
sort_type2:"DESC",
},
page_size: 10,
sort_name: "year",
sort_type: "DESC",
sort_name2: "date",
sort_type2: "DESC",
},
productList:[],
total: 0,
list: [],
table_item: [{
@ -72,36 +84,36 @@
}, {
prop: 'year',
label: 'Year',
align: 'left',
width:120,
align: 'left',
width: 120,
}, {
prop: 'title',
label: 'Title',
align: 'left',
width:480,
align: 'left',
width: 480,
},
{
prop: 'link',
label: 'Link',
align: 'left',
width:480,
},{
prop: 'date',
label: 'Release Time',
align: 'left',
width:180
},
align: 'left',
width: 480,
}, {
prop: 'date',
label: 'Release Time',
align: 'left',
width: 180
},
// {
// prop: 'date',
// label: 'Release Time',
// align: 'left',
// align: 'left',
// width:180
// },
{
prop: 'admin.name',
label: 'Creator',
align: 'left',
width:180
// },
{
prop: 'admin.name',
label: 'Creator',
align: 'left',
width: 180
}
]
@ -109,12 +121,21 @@
},
created() {
this.getList()
this.getProductList()
},
methods: {
async getProductList() {
const res = await getProduct({
page_size: 9999,
page: 1
})
this.productList = res.data
},
editLr(type, id) {
if (type == 'editor') {
this.$refs.addLr.id = id
}
}
this.$refs.addLr.productList = this.productList
this.$refs.addLr.type = type
this.$refs.addLr.isShow = true
},
@ -132,23 +153,27 @@
this.select.title = ''
this.getList()
},
async getList() {
const res = await index({
...this.select,
filter:[{
key:'title',
op:'like',
value:this.select.title
}]
async getList() {
const res = await index({
...this.select,
filter: [{
key: 'title',
op: 'like',
value: this.select.title
},{
key: 'product_numbers',
op: 'like',
value: this.select.number
}]
})
this.list = res.data
this.total = res.total
},
deleteList(id) {
var that = this;
destroy({
table_name:this.select.table_name,
id:id
destroy({
table_name: this.select.table_name,
id: id
}).then(response => {
this.$Message.success('Success');
this.getList()

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
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',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save