Commit 3ac7aa89 by hanjixin

listtype

parent 333a90ae
......@@ -9,7 +9,7 @@
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"lint": "eslint --fix --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
......
import request from '@/utils/request'
/**
*
* @param {*} typeMenuName
* @param {*} typeMenuOrder
* 新增类型
*/
export function typeAdd(typeMenuName: '', typeMenuOrder: 0) {
return request({
url: '/type/add/info',
method: 'post',
data: {
typeMenuName,
typeMenuOrder
}
})
}
/**
*
* @param {*} tagName
* @param {*} typeId
* 新增标签
*/
export function typeAddTag(tagName: '', typeId: '') {
return request({
url: '/type/add/tag/info',
method: 'post',
data: {
tagName,
typeId
}
})
}
/**
*
* @param {*} tagId
* 根据标签id删除标签
*/
export function typeDelTag(tagId) {
return request({
url: '/type/del/tag',
method: 'get',
params: { tagId }
})
}
/**
*
* @param {*} typeId
* 根据模板类型id删除模板类型
*/
export function typeDel(typeId) {
return request({
url: '/type/del',
method: 'get',
params: { typeId }
})
}
/**
*
* @param {*} typeId
* 根据类型ID查看详情
*/
export function getTypeDetail(typeId) {
return request({
url: '/type/get/details/info',
method: 'get',
params: { typeId }
})
}
/**
*
* @param {*} p
* @param {*} c
* 获取模板类型列表信息(分页)
*/
export function getTypeList(p: 1, c: 20) {
return request({
url: '/type/get/list',
method: 'get',
params: { p, c }
})
}
/**
*
* @param {*} typeId
* @param {*} p
* @param {*} c
* 获取当前类型下标签列表信息(分页)
*/
export function getTypeTagList(typeId: '', p : 1, c:20) {
return request({
url: '/type/get/tag/list',
method: 'post',
data: {
typeId
},
params: {
p,
c
}
})
}
/**
*
* @param {*} typeMenuName
* @param {*} typeMenuId
* 根据类型ID修改模板类型信息
*/
export function typeUpdateInfo(typeMenuName, typeMenuId) {
return request({
url: '/type/update/info',
method: 'post',
data: {
typeMenuName,
typeMenuId
}
})
}
/**
*
* @param {*} tagId
* @param {*} tagName
* 修改标签信息
*/
export function typeUpdateTagInfo(tagId, tagName) {
return request({
url: '/type/update/tag/info',
method: 'post',
data: {
tagId,
tagName
}
})
}
/**
*
* @param {*} typeMenuId
* @param {*} typeMenuType
* 根据类型id修改状态
*/
export function typeUpdateType(typeMenuId, typeMenuType) {
return request({
url: '/type/update/type',
method: 'post',
data: {
typeMenuId,
typeMenuType
}
})
}
import request from '@/utils/request'
/**
*
* @param {*} data
* {
"templateName": "string",
"templateUrl": "string",
"frameInfo": {
"frameUrl": "string"
},
"resourceInfo": {
"resourceUrl": "string"
},
"templateDescribe": "string",
"typeId": "string",
"tagIds": [
"string"
],
"templateEnvironment": "string",
"templateShow": "string",
"templateProportion": "string",
"templatePackageName": "string"
}
新增模板
*/
export function templateAdd(data) {
return request({
url: '/template/add',
method: 'post',
data
})
}
/**
*
* @param {*} templateId
* 删除模板根据模板id
*/
export function templateDel(templateId) {
return request({
url: '/template/del',
method: 'get',
params: {
templateId
}
})
}
/**
*
* @param {*} typeId
* 根据模板类型获取对应类型下标签列表
*/
export function templateGetTagList(typeId) {
return request({
url: '/template/get/tag/list',
method: 'get',
params: {
typeId
}
})
}
/**
* 获取模板类型列表
*/
export function templateGetTypeList() {
return request({
url: '/template/get/type/list',
method: 'get',
data: {}
})
}
/**
*
* @param {*} resourse
* zip资源上传解压功能
*/
export function templateUploadZipResourse(resourse) {
return request({
url: '/template/upload/zip/resourse',
method: 'post',
data: {
resourse
}
})
}
......@@ -16,8 +16,7 @@
</template>
<script>
import RightPanel from '@/components/RightPanel'
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
import { AppMain, Navbar, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
......@@ -26,8 +25,7 @@ export default {
components: {
AppMain,
Navbar,
RightPanel,
Settings,
// Settings,
Sidebar,
TagsView
},
......
......@@ -13,9 +13,15 @@ const templatesRouter = {
},
children: [
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '模板类型' }
},
{
path: 'list',
component: () => import('@/views/table/complex-table'),
name: 'DynamicTable',
component: () => import('@/views/template/template-list'),
name: 'TemplateList',
meta: { title: '模板列表' }
}
]
......
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 sign in to comment