add mockjs“
This commit is contained in:
parent
7f7192f38a
commit
a861c23d67
@ -3,8 +3,9 @@ const Random = Mock.Random
|
|||||||
|
|
||||||
const pageViewModel = () => ({
|
const pageViewModel = () => ({
|
||||||
code: Random.county(),
|
code: Random.county(),
|
||||||
stateDictValue: Random.integer(1, 7),
|
stateDictValue: Random.integer(0, 3),
|
||||||
orderCode: Random.string(10),
|
// orderCode: Random.string(10),
|
||||||
|
orderCode: Random.integer(1,7),
|
||||||
posCode: Random.string(10),
|
posCode: Random.string(10),
|
||||||
startTime: Random.datetime(),
|
startTime: Random.datetime(),
|
||||||
endTime: Random.datetime(),
|
endTime: Random.datetime(),
|
||||||
|
@ -10,7 +10,7 @@ function m(url, type, fn) {
|
|||||||
m(carManagement.url, carManagement.type, opt => {
|
m(carManagement.url, carManagement.type, opt => {
|
||||||
let { limit, page } = JSON.parse(opt.body)
|
let { limit, page } = JSON.parse(opt.body)
|
||||||
// console.log('limit, page', limit, page, opt.body)
|
// console.log('limit, page', limit, page, opt.body)
|
||||||
limit = 5
|
// limit = 5
|
||||||
return {
|
return {
|
||||||
code: 0,
|
code: 0,
|
||||||
data: {
|
data: {
|
||||||
|
@ -9,7 +9,7 @@ export default function () {
|
|||||||
{ type: 'index', label: '序号' },
|
{ type: 'index', label: '序号' },
|
||||||
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||||
{ prop: "code", label: "窑车号" },
|
{ prop: "code", label: "窑车号" },
|
||||||
{ prop: "stateDictValue", label: "状态", filter: () => '需要子组件' }, // subcomponent
|
{ prop: "stateDictValue", label: "状态", filter: v => (v !== null && v !== undefined) ? ['没有数据', '正常', '判废', '过渡'][v] : '-' }, // subcomponent
|
||||||
{ prop: "orderCode", label: "订单号" },
|
{ prop: "orderCode", label: "订单号" },
|
||||||
{ prop: "posCode", label: "位置" },
|
{ prop: "posCode", label: "位置" },
|
||||||
{ prop: "startTime", label: "开始时间" },
|
{ prop: "startTime", label: "开始时间" },
|
||||||
@ -22,8 +22,8 @@ export default function () {
|
|||||||
width: 90,
|
width: 90,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: "to-car-payload", label: "装载详情" },
|
{ name: "to-car-payload", label: "装载详情", icon: 'document' },
|
||||||
{ name: "to-car-history", label: "查看历史", emitFull: true }
|
{ name: "to-car-history", label: "查看历史", emitFull: true, icon: 'time' }
|
||||||
// { name: "edit", label: "编辑", icon: "edit-outline" },
|
// { name: "edit", label: "编辑", icon: "edit-outline" },
|
||||||
// { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:car:delete" }
|
// { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:car:delete" }
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user