master
lion 11 months ago
parent 4345926d07
commit 237d9fe1f7

@ -32,6 +32,7 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"sortablejs": "^1.15.6",
"tinymce": "^5.10.7",
"view-design": "^4.7.0",
"vue": "2.6.10",

@ -6,14 +6,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<script>
<script src="tinymce/tinymce.min.js"></script>
<!-- <script>
window._AMapSecurityConfig = {
securityJsCode: '0d59d0a3fa5483849b52b0edc4bc97ec',
}
</script>
<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=795a757114c371f42cee1f8efa527684&plugin=AMap.PlaceSearch'></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script> -->
</head>
<body>
<noscript>

@ -1,6 +1,6 @@
<template>
<div class="tinymce">
<Editor v-model="myValue" :init="init" :disabled="disabled"></Editor>
<Editor v-model="myValue" :id="keyid" :init="init" :disabled="disabled"></Editor>
</div>
</template>
@ -30,7 +30,7 @@
import 'tinymce/plugins/code'
import "tinymce/plugins/image"
import "tinymce/plugins/imagetools"
import "/public/tinymce/plugins/axupimgs/plugin.js"
// import "/public/tinymce/plugins/axupimgs/plugin.js"
export default {
components: {
Editor
@ -43,6 +43,10 @@
value: {
type: String,
default: "",
},
keyid:{
type: String,
default: "tinymce",
},
disabled: {
type: Boolean,
@ -72,7 +76,9 @@
imgUploadUrl: `${process.env.VUE_APP_UPLOAD_API}`,
init: {
// language_url: "/public/tinymce/langs/zh_CN.js", //
// language: "zh_CN",
// language: "zh_CN",
selector:`#${this.keyid}`,
// selector: "#textarea",
height: this.height,
plugins: this.plugins,
fontsize_formats: "8px 10px 12px 14px 16px 18px 24px 28px 36px",

@ -88,7 +88,10 @@ Vue.prototype.$integrateData = (target, value) => {
target[i] = value[i]
}
}
}
}
import Sortable from 'sortablejs';
/**
* If you don't want to use mock-server

@ -8,7 +8,7 @@ export default{
separationModeList:[],
brandList:[],
resourceList:{
broadSampleTypeList: [],
// broadSampleTypeList: [],
specificSampleList: [],
catalogTypeList:[]
},
@ -38,7 +38,7 @@ export default{
})
},
getResourcePara(){
let number = ['catalogTypeList','broadSampleTypeList','specificSampleList']
let number = ['catalogTypeList','specificSampleList']
getparameter({
number: number,
type:3

@ -28,7 +28,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Size Exclusion
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.size" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.size" placeholder="Please Select">
<el-option v-for="item in productPhaseList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
@ -40,7 +40,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Ion Exchange
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.lon" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.lon" placeholder="Please Select">
<el-option v-for="item in productPhaseList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
@ -52,7 +52,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Reversed phase
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.phase" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.phase" placeholder="Please Select">
<el-option v-for="item in productPhaseList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
@ -64,7 +64,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Hydrophobic Interaction
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.interaction" placeholder="Please Select">
<el-select style="width:100%" multiple filterable="" collapse-tags v-model="form.interaction" placeholder="Please Select">
<el-option v-for="item in productPhaseList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
:rules='rules' @submit="submit">
<template v-slot:application_type_id>
<div class="xy-table-item">
@ -8,25 +8,25 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Application Category
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.application_type_id" placeholder="Please Select">
<el-select style="width:100%" filterable v-model="form.application_type_id" placeholder="Please Select">
<el-option v-for="item in appCategoryList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:category_id>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="form.category_id" placeholder="Please Select">
<el-option v-for="(item,index) in productCategoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:category_id>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple filterable style="width:100%" v-model="form.category_id" placeholder="Please Select">
<el-option v-for="(item,index) in productCategoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:number>
<div class="xy-table-item">
@ -54,7 +54,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Separation Mode
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.separation" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.separation"
placeholder="Please Select">
<el-option v-for="item in separationModeList" :key="item.id" :label="item.value"
:value="item.id"></el-option>
</el-select>
@ -67,7 +68,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Brand
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.branch" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.branch"
placeholder="Please Select">
<el-option v-for="item in brandList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
@ -79,7 +81,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Topic
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.topic" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.topic"
placeholder="Please Select">
<el-option v-for="item in topicList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
@ -91,7 +94,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Equipment
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.equipment" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.equipment"
placeholder="Please Select">
<el-option v-for="item in equipmentList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
@ -103,8 +107,9 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Files
</div>
<div class="xy-table-item-content">
<el-upload :action="action" :limit="1" class='upload-demo' multiple :file-list="filesList" ref="pictureUpload"
:auto-upload="true" :data="uploadOther" :on-success="handlesuccess" :on-remove="handleRemove">
<el-upload :action="action" :limit="1" class='upload-demo' multiple :file-list="filesList"
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
:on-remove="handleRemove">
<el-button size="small" type="primary">upload</el-button>
</el-upload>
</div>
@ -113,13 +118,14 @@
<template v-slot:application_details>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Note Details
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Column
</div>
<div class="xy-table-item-content">
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addRow">Add Row</el-button>
<xy-table :list="form.application_details" :isPage="false" :height="350" :table-item="detail_item">
<xy-table style="width:850px" :list="form.application_details" :isPage="false" :height="350"
:table-item="detail_item">
<template v-slot:key>
<el-table-column align='left' label="key">
<el-table-column align='left' label="key" width="340">
<template slot-scope="scope">
<el-input placeholder="Please Input" style="width:100%" v-model="scope.row.key"></el-input>
@ -127,7 +133,7 @@
</el-table-column>
</template>
<template v-slot:value>
<el-table-column align='left' label="value">
<el-table-column align='left' label="value" width="340">
<template slot-scope="scope">
<el-input placeholder="Please Input" style="width:100%" v-model="scope.row.value"></el-input>
</template>
@ -163,9 +169,9 @@
} from '@/utils/auth'
import
applicationMixin
from "@/mixin/application.js"
import {
index as getCategory
from "@/mixin/application.js"
import {
index as getCategory
} from "@/api/product/category.js"
export default {
mixins: [applicationMixin],
@ -179,21 +185,23 @@
},
action: `${process.env.VUE_APP_UPLOAD_API}`,
filesList: [],
appCategoryList: [],
productCategoryList:[],
appCategoryList: [],
productCategoryList: [],
detail_item: [{
type: 'index',
width: 50
}, {
prop: 'key',
label: 'key'
label: 'key',
width: 340
}, {
prop: 'value',
label: 'value',
width: 340
}],
form: {
application_type_id: '',
category_id:[],
application_type_id: '',
category_id: [],
number: '',
title: "",
separation: [],
@ -220,7 +228,7 @@
}
},
created() {
this.uploadOther.token = getToken();
this.uploadOther.token = getToken();
this.getCategoryList()
},
methods: {
@ -244,17 +252,17 @@
},
delRow(obj, index) {
this.form.application_details.splice(index, 1);
},
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type:2
})
this.productCategoryList = res.data
},
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.productCategoryList = res.data
},
submit() {
if (this.id) {
@ -320,8 +328,8 @@
this.id = ''
this.filesList = []
this.form = {
application_type_id: '',
category_id:[],
application_type_id: '',
category_id: [],
number: '',
title: "",
separation: [],

@ -20,8 +20,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.product_id" placeholder="Please Select">
<el-option v-for="item in productList" :key="item.id" :label="item.value" :value="item.id"></el-option>
<el-select style="width:100%" filterable v-model="form.product_id" placeholder="Please Select">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
@ -53,7 +53,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Country/Region
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.region" placeholder="Please Select">
<el-select style="width:100%" filterable v-model="form.region" placeholder="Please Select">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
</div>
@ -99,7 +99,10 @@
import {
save,
show
} from "@/api/customer/message.js"
} from "@/api/customer/message.js"
import {
index as getProduct
} from "@/api/product/index.js"
import customerMixin from "@/mixin/customer.js"
export default {
mixins:[customerMixin],
@ -139,10 +142,17 @@
}
}
},
created() {
created() {
this.getProductList()
},
methods: {
async getProductList() {
const res = await getProduct({
page_size: 9999,
page: 1
})
this.productList = res.data
},
submit() {
if (this.id) {
this.form.id = this.id

@ -71,7 +71,7 @@
<template v-slot:value>
<el-table-column align='left' label="value" width="340">
<template slot-scope="scope">
<el-select multiple collapse-tags v-if="scope.row.type==='select'" style="width:100%"
<el-select multiple filterable collapse-tags v-if="scope.row.type==='select'" style="width:100%"
v-model="scope.row.value" placeholder="Please Select">
<el-option v-for="(item,index) in scope.row.list" :key="index" :label="item.value"
:value="item.value">

@ -8,7 +8,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Category
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="pcSubList" placeholder="Please Select">
<el-select multiple style="width:100%" filterable v-model="pcSubList" placeholder="Please Select">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -36,6 +36,20 @@
</div>
</div>
</template>
<template v-slot:is_recommend>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Recommend
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_recommend">
<el-radio :label="1">Yes</el-radio>
<el-radio :label="0">No</el-radio>
</el-radio-group>
</div>
</div>
</template>
<template v-slot:description>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -68,7 +82,7 @@
</div>
<div class="xy-table-item-content">
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addRow">Add</el-button>
<xy-table style="width:850px" :list="form.product_category_details" :isPage="false" :height="350"
<xy-table key="1" style="width:850px" :list="form.product_category_details" :isPage="false" :height="350"
:table-item="detail_item">
<template v-slot:key>
<el-table-column align='left' label="key" width="340">
@ -85,7 +99,7 @@
<template v-slot:value>
<el-table-column align='left' label="value" width="340">
<template slot-scope="scope">
<el-select multiple collapse-tags v-if="scope.row.type==='select'" style="width:100%"
<el-select multiple filterable collapse-tags v-if="scope.row.type==='select'" style="width:100%"
v-model="scope.row.value" placeholder="Please Select">
<el-option v-for="(item,index) in scope.row.list" :key="index" :label="item.value"
:value="item.value">
@ -119,14 +133,12 @@
<div class="xy-table-item-content">
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addAppRow('','add')">Add
Application</el-button>
<xy-table style="width:850px" :list="applicationsList" :isPage="false" :height="350"
<xy-table key="2" style="width:850px" :list="applicationsList" :isPage="false" :height="350"
:table-item="application_detail_item">
<template v-slot:btns>
<el-table-column align='center' label="operate" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="addAppRow(scope.row.id,'editor')">edit</el-button>
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
@confirm="delAppRow(scope.row.id,scope.$index)" title="Are you sure to delete it?">
<el-button type="danger" size="small" slot="reference">delete</el-button>
@ -162,22 +174,22 @@
<!-- <wangEditor :isShow="isShow" v-show="showWang" :value="form.character"
@change="(e)=>{changeEditor(e,'character')}"></wangEditor> -->
<my-tinymce v-if="showWang" @input="(e)=>{changeEditor(e,'character')}"
<my-tinymce v-if="showWang" :keyid="'character'" @input="(e)=>{changeEditor(e,'character')}"
:value="form.character"></my-tinymce>
</div>
</div>
</template>
<!-- <template v-slot:packing>
<template v-slot:packing>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Packing
</div>
<div class="xy-table-item-content">
<wangEditor :isShow="isShow" v-show="showWang" :value="form.packing"
@change="(e)=>{changeEditor(e,'packing')}"></wangEditor>
<my-tinymce :keyid="'packing'" v-if="showWang" @input="(e)=>{changeEditor(e,'packing')}"
:value="form.packing"></my-tinymce>
</div>
</div>
</template> -->
</template>
@ -239,17 +251,18 @@
prop: 'key',
label: 'Key',
align: 'left',
width: 620
width: 340
}, {
prop: 'value',
label: 'Value',
align: 'left',
width: 620
width: 340
}],
form: {
product_category_links_by_sub: [],
name: '',
sort: 0,
is_recommend: 0,
description: '',
picture_id: '',
product_category_details: [],
@ -258,7 +271,7 @@
download_ids: [],
character: '',
// packing: '',
packing: '',
pid: 0,
},
rules: {
@ -272,8 +285,10 @@
created() {
this.uploadOther.token = getToken();
},
methods: {
mounted() {
},
methods: {
handleRemoved(file, fileList) {
this.downloadsList = fileList
},
@ -341,6 +356,10 @@
destroy({
id: id
}).then(response => {
this.$message({
type: 'success',
message: 'Success'
})
this.applicationsList.splice(index, 1);
}).catch(error => {
console.log(error)
@ -467,8 +486,9 @@
this.form = this.base.requestToForm(res, this.form)
this.form.description = res.description ? res.description : ''
this.form.character = res.character ? res.character : ''
// this.packing = res.packing ? res.packing : ''
this.form.applicationsList = res.product_category_applications
this.form.packing = res.packing ? res.packing : ''
this.applicationsList = res.product_category_applications
this.form.is_recommend = res.is_recommend ? res.is_recommend : 0
this.showWang = true
// category
@ -516,7 +536,6 @@
this.getDetail()
}
for (var k in this.productDetailsKeyList) {
if (this.productDetailsKeyList[k]["type"] === 'select') {
this.selectList.push(this.productDetailsKeyList[k])
if (this.type === 'add') {
@ -537,18 +556,20 @@
this.downloadsList = []
this.pictureList = []
this.applicationsList = []
this.selectList = []
this.selectList = []
this.pcSubList = []
this.form = {
product_category_links_by_sub: [],
name: '',
sort: 0,
is_recommend: 0,
picture_id: '',
product_category_details: [],
product_category_applications: [],
download_ids: [],
description: '',
character: '',
// packing: '',
packing: '',
pid: 0,
}
this.$refs['dialog'].reset()
@ -562,7 +583,7 @@
<style scoped lang="scss">
::v-deep .product_category_links_by_sub,
::v-deep .name,
::v-deep .sort,
// ::v-deep .sort,
::v-deep .product_category_applications,
::v-deep .download_ids,
::v-deep .description,

@ -15,7 +15,7 @@
<template v-slot:number>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Product Number
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Part Number
</div>
<div class="xy-table-item-content">
<el-input placeholder="Please Input" style="width:100%" v-model="form.number"></el-input>
@ -28,7 +28,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="form.category_id" placeholder="Please Select">
<el-select multiple style="width:100%" filterable v-model="form.category_id" placeholder="Please Select">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -77,7 +77,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Web Visibility
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.show_price">
<el-radio-group v-model="form.show_price" @change="changeWeb">
<el-radio :label="1">Yes</el-radio>
<el-radio :label="0">No</el-radio>
</el-radio-group>
@ -256,6 +256,14 @@
row.type = this.productDetailsKeyList[e].type
row.list = this.productDetailsKeyList[e].list
row.value = ''
},
changeWeb(e){
console.log(e)
if(e===0){
if(this.base.isNull(this.form.list_price)){
this.form.list_price = 99999
}
}
},
submit() {
if (this.id) {
@ -319,7 +327,10 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
// this.form.content = res.content ? res.content : ''
this.form.category_id = res.category_id ? res.category_id : []
this.form.category_id = res.category_id ? res.category_id : [],
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.is_sell = res.is_sell?res.is_sell:0
this.form.show_price = res.show_price?res.show_price:0
res.product_details.map(item => {
item.type = this.productDetailsKeyList[item.key]['type']
if (this.productDetailsKeyList[item.key].type === 'select') {

@ -8,6 +8,9 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="Name"></el-input>
</div>
<div>
<el-input v-model="select.number" placeholder="Part Number"></el-input>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -69,7 +72,8 @@
data() {
return {
select: {
name: '',
name: '',
number:'',
page: 1,
page_size: 10,
},
@ -92,7 +96,7 @@
width: 360
}, {
prop: 'number',
label: 'Product Number(产品编号)',
label: 'Part Number(产品编号)',
align: 'left',
width: 360
}, {
@ -156,7 +160,8 @@
},
resetSearch() {
this.select.page = 1
this.select.name = ''
this.select.name = ''
this.select.number = ''
this.getList()
},
async getList() {
@ -166,6 +171,10 @@
key: 'name',
op: 'like',
value: this.select.name
},{
key: 'number',
op: 'like',
value: this.select.number
}]
})
this.list = res.data

@ -8,6 +8,14 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="Name"></el-input>
</div>
<div>
<el-select clearable style="width:100%" v-model="select.is_recommend" placeholder="Recommend">
<el-option :key="1" label="Yes" :value="1">
</el-option>
<el-option :key="0" label="No" :value="0">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -70,6 +78,7 @@
return {
select: {
name: '',
is_recommend:'',
type:2,
page: 1,
page_size: 10,
@ -125,7 +134,16 @@
page: this.select.page,
type:this.select.type,
sort_type: 'ASC',
sort_name: 'sort',
sort_name: 'sort',
filter: [{
key: 'name',
op: 'like',
value: this.select.name
},{
key: 'is_recommend',
op: 'eq',
value: this.select.is_recommend
}]
})
this.list = res.data
this.total = res.total
@ -133,6 +151,7 @@
resetSearch() {
this.select.page = 1
this.select.name = ''
this.select.is_recommend = ''
this.select.type = 2
this.getList()
},

@ -8,7 +8,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-select multiple filterable style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -31,7 +31,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Type
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.type" placeholder="Please Select">
<el-select style="width:100%" filterable v-model="form.type" placeholder="Please Select">
<el-option v-for="item in resourceList.catalogTypeList" :key="item.id" :label="item.value"
:value="item.id">
</el-option>

@ -8,7 +8,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-select multiple filterable style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>

@ -8,7 +8,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-select multiple collapse-tags filterable style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -54,7 +54,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>PN
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.product_numbers" multiple collapse-tags
<el-select style="width:100%" filterable v-model="form.product_numbers" multiple collapse-tags
placeholder="Please Select">
<el-option v-for="item in productList" :key="item.id" :label="item.number" :value="item.id">
</el-option>
@ -68,7 +68,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Separation Mode
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.separation_mode" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.separation_mode" placeholder="Please Select">
<el-option v-for="item in separationModeList" :key="item.id" :label="item.value"
:value="item.id">
</el-option>
@ -82,8 +82,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Broad Sample Type
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.broad_sample_type" placeholder="Please Select">
<el-option v-for="item in resourceList.broadSampleTypeList" :key="item.id" :label="item.value"
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.broad_sample_type" placeholder="Please Select">
<el-option v-for="item in applicationList" :key="item.id" :label="item.name"
:value="item.id">
</el-option>
</el-select>
@ -96,7 +96,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Specific Sample
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple collapse-tags v-model="form.specific_sample" placeholder="Please Select">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.specific_sample" placeholder="Please Select">
<el-option v-for="item in resourceList.specificSampleList" :key="item.id" :label="item.value"
:value="item.id">
</el-option>
@ -119,6 +119,9 @@
import {
index as getCategory
} from "@/api/product/category.js"
import {
index as getApplication
} from "@/api/application/category.js"
import {
index as getProduct
} from "@/api/product/index.js"
@ -131,9 +134,11 @@
id: '',
type: 'add',
productList: [],
categoryList: [],
categoryList: [],
applicationList: [],
form: {
category_ids: [],
category_ids: [],
application_ids:[],
year: "",
title: "",
link: '',
@ -160,7 +165,8 @@
},
created() {
this.getCategoryList()
this.getProductList()
this.getProductList()
this.getApplicationList()
},
methods: {
async getCategoryList() {
@ -173,9 +179,19 @@
})
this.categoryList = res.data
},
async getApplicationList() {
const res = await getApplication({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort'
})
this.applicationList = res.data
},
async getProductList() {
const res = await getProduct({
page_size: 999,
page_size: 9999,
page: 1
})
this.productList = res.data
@ -229,6 +245,7 @@
this.id = ''
this.form = {
category_ids: [],
application_ids:[],
year: "",
title: "",
link: '',

@ -8,7 +8,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-select multiple filterable style="width:100%" v-model="form.category_ids" placeholder="Please Select">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>

Loading…
Cancel
Save