Commit 344b2fa4 by 胡悦

触发条件前的提交

1 parent d5369273
import { GlAxios } from 'glsx-vue-common' import { GlAxios } from 'glsx-vue-common'
import axios from './axios' import axios from './axios'
const path = '/smartAdmin/sceneTemplate/' const path = '/smartAdmin/sceneTemplate/'
const path1 = '/smartAdmin/productType/'
// 获取分页数据列表 // 获取分页数据列表
function getList(params) { function getList(params) {
return GlAxios.get(`${path}getList`, { params }) return GlAxios.get(`${path}getList`, { params })
...@@ -16,4 +16,8 @@ function updateStatus(data, baseURl) { ...@@ -16,4 +16,8 @@ function updateStatus(data, baseURl) {
}) })
} }
export { getList, updateStatus } // 获取场景指令内容列表
function getConditionList(params) {
return GlAxios.get(`${path1}getConditionList`, { params })
}
export { getList, updateStatus, getConditionList }
...@@ -264,7 +264,6 @@ export default { ...@@ -264,7 +264,6 @@ export default {
params.sortColum = this.sortColum params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0 params.sort = this.sort === 'descending' ? 1 : 0
} }
console.log(params)
this.getListApi(params).then(res => { this.getListApi(params).then(res => {
this.data = res[this.tableParams.listName] this.data = res[this.tableParams.listName]
this.total = res.totalElements this.total = res.totalElements
......
...@@ -87,3 +87,19 @@ a:hover { ...@@ -87,3 +87,19 @@ a:hover {
.m-t-sm { .m-t-sm {
margin-top: 20px; margin-top: 20px;
} }
// 上传按钮
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 70px;
height: 36px;
cursor: pointer;
font-size: 0;
}
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
} }
}, },
created() { created() {
getList({ type: 0 }).then(res => (this.iconList = res)) getList({ type: 1 }).then(res => (this.iconList = res))
}, },
methods: { methods: {
uploadImg(e) { uploadImg(e) {
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
++flag ++flag
filesList.push({ filesList.push({
name: e.target.files[0].name.split('.')[0], name: e.target.files[0].name.split('.')[0],
type: 0, type: 1,
url: res.data.data url: res.data.data
}) })
if (flag == curFile.length) { if (flag == curFile.length) {
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
getList({ type: 0 }).then(res => (this.iconList = res)) getList({ type: 1 }).then(res => (this.iconList = res))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -136,12 +136,12 @@ export default { ...@@ -136,12 +136,12 @@ export default {
}).then(res => { }).then(res => {
params.url = res.data.data params.url = res.data.data
return updateFile(params, this.baseURL).then(r => { return updateFile(params, this.baseURL).then(r => {
if (r.data.data) { if (r) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
getList({ type: 0 }).then(res => (this.iconList = res)) getList({ type: 1 }).then(res => (this.iconList = res))
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -151,7 +151,6 @@ export default { ...@@ -151,7 +151,6 @@ export default {
}) })
}) })
} }
// updateFile()
} }
} }
} }
......
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
}, },
updateStatus(scope) { updateStatus(scope) {
const text = scope.status == 0 ? '上' : '下' const text = scope.status === 0 ? '上' : '下'
this.$confirm(`确认要${text}架?`, '提示', { this.$confirm(`确认要${text}架?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!