Commit 7498a78f by zhangmengqi

Merge branch 'dev'

parents 5480e029 0c047a58
......@@ -6,6 +6,13 @@ let envFilename = '.env.development'
if (process.env.NODE_ENV) {
envFilename = '.env.' + process.env.NODE_ENV
}
// 静态服务文件地址
let staticURL = 'http://static.patzn.com'
console.log('process.env.STATIC_URL==', process.env.STATIC_URL)
if (process.env.STATIC_URL) {
// 取各个配置文件中的 STATIC_URL
staticURL = process.env.STATIC_URL
}
module.exports = {
mode: 'universal',
server: {
......@@ -22,13 +29,14 @@ module.exports = {
{ hid: 'description', name: 'description', content: pkg.description }
],
script: [
{ src: 'http://static.patzn.com/js/jquery-3.3.1.min.js' },
{ src: staticURL + '/js/jquery-3.3.1.min.js' },
{
src:
'http://static.patzn.com/thirdparty/ztree/zTree_v3-3.5.29/js/jquery.ztree.all.min.js'
staticURL +
'/thirdparty/ztree/zTree_v3-3.5.29/js/jquery.ztree.all.min.js'
},
{
src: 'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.js'
src: staticURL + '/thirdparty/layx/layx-2.5.3.min.js'
},
{
src:
......@@ -39,29 +47,30 @@ module.exports = {
{
rel: 'icon',
type: 'image/x-icon',
href: 'http://static.patzn.com/favicon.ico'
href: staticURL + '/favicon.ico'
},
{
rel: 'stylesheet',
href:
'http://static.patzn.com/thirdparty/ztree/zTree_v3-3.5.29/css/metroStyle/metroStyle.css'
staticURL +
'/thirdparty/ztree/zTree_v3-3.5.29/css/metroStyle/metroStyle.css'
},
{
rel: 'stylesheet',
href: 'http://static.patzn.com/thirdparty/ztree/menuStyle.css'
href: staticURL + '/thirdparty/ztree/menuStyle.css'
},
{
rel: 'stylesheet',
href: 'http://static.patzn.com/css/animate.css'
href: staticURL + '/css/animate.css'
},
{
rel: 'stylesheet',
href: 'http://static.patzn.com/theme/my-theme/main.css'
href: staticURL + '/theme/my-theme/main.css'
},
{ rel: 'stylesheet', href: '', name: 'theme' },
{
rel: 'stylesheet',
href: 'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.css'
href: staticURL + '/thirdparty/layx/layx-2.5.3.min.css'
}
]
},
......
......@@ -8,6 +8,7 @@
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
"build": "nuxt build",
"start": "cross-env NODE_ENV=production node server/index.js",
"zhyf": "cross-env NODE_ENV=zhyf STATIC_URL=http://static.lims.com nuxt build",
"test": "cross-env NODE_ENV=testing node server/index.js",
"pertest": "cross-env NODE_ENV=pertesting node server/index.js",
"devtest": "cross-env NODE_ENV=devtest node server/index.js",
......
......@@ -18,7 +18,7 @@
</Col>
<!--操作-->
<Col span="24">
<btn-list :open="searchOpen" :showSearchBtn="true" @on-result-change="_btnClick"
<btn-list :open="searchOpen" :msg="btn" :showSearchBtn="true" @on-result-change="_btnClick"
class="contHide"></btn-list>
</Col>
<!-- 表格 -->
......@@ -64,7 +64,7 @@ export default {
return {
currentComponent: '',
getPage: {},
btn: [],
btn: [{ type: 'error', id: '', name: '批量删除' }],
selectIds: [],
iconMsg: [
{
......@@ -75,9 +75,12 @@ export default {
{ type: 'md-trash', id: '', name: '删除' }
],
pageColumns: [
{ title: '附录名称', key: 'title' },
{ title: '填写人', key: 'uname' },
{ title: '创建时间', key: 'ctime', dateTime: true }
{ title: '附录标题', key: 'title', width: 85 },
{ title: '附录名称', key: 'name', width: 120 },
{ title: '附件类型', key: 'remark', width: 85 },
{ title: '样品编号', key: 'sampleCode', width: 90 },
{ title: '填写人', key: 'uname', width: 85 },
{ title: '创建时间', key: 'ctime', dateTime: true, width: 120 }
],
formObj: {
entrustId: ''
......@@ -111,12 +114,35 @@ export default {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '批量删除':
this._batchDelete()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
})
},
_batchDelete() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定删除?',
onOk: () => {
this._delete()
}
})
}
},
_delete: async function() {
const result = await soilTest.appendixDelete(this.selectIds.join(','))
if (result) {
this.$Message.success('删除成功')
this._page()
}
},
_iconClick(res, data, currentComponent) {
this.currentComponent = currentComponent
this.$nextTick(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment