Commit 344b2fa4 by 胡悦

触发条件前的提交

1 parent d5369273
import { GlAxios } from 'glsx-vue-common'
import axios from './axios'
const path = '/smartAdmin/sceneTemplate/'
const path1 = '/smartAdmin/productType/'
// 获取分页数据列表
function getList(params) {
return GlAxios.get(`${path}getList`, { params })
......@@ -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 {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
console.log(params)
this.getListApi(params).then(res => {
this.data = res[this.tableParams.listName]
this.total = res.totalElements
......
......@@ -87,3 +87,19 @@ a:hover {
.m-t-sm {
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 {
}
},
created() {
getList({ type: 0 }).then(res => (this.iconList = res))
getList({ type: 1 }).then(res => (this.iconList = res))
},
methods: {
uploadImg(e) {
......@@ -84,7 +84,7 @@ export default {
++flag
filesList.push({
name: e.target.files[0].name.split('.')[0],
type: 0,
type: 1,
url: res.data.data
})
if (flag == curFile.length) {
......@@ -95,7 +95,7 @@ export default {
type: 'success',
message: '操作成功'
})
getList({ type: 0 }).then(res => (this.iconList = res))
getList({ type: 1 }).then(res => (this.iconList = res))
} else {
this.$message({
type: 'error',
......@@ -136,12 +136,12 @@ export default {
}).then(res => {
params.url = res.data.data
return updateFile(params, this.baseURL).then(r => {
if (r.data.data) {
if (r) {
this.$message({
type: 'success',
message: '操作成功'
})
getList({ type: 0 }).then(res => (this.iconList = res))
getList({ type: 1 }).then(res => (this.iconList = res))
} else {
this.$message({
type: 'error',
......@@ -151,7 +151,6 @@ export default {
})
})
}
// updateFile()
}
}
}
......
......@@ -93,7 +93,7 @@ export default {
},
updateStatus(scope) {
const text = scope.status == 0 ? '上' : '下'
const text = scope.status === 0 ? '上' : '下'
this.$confirm(`确认要${text}架?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!