Commit 3da3304b authored by 周远喜's avatar 周远喜

树接口更新

parent 5939502d
//-------------蓝色----------- //-------------蓝色-----------
@Theme: rgba(38, 128, 235, 1);
//滚动条颜色 //滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239); @scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5); @scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
......
This diff is collapsed.
...@@ -2,30 +2,48 @@ import XLSX from 'xlsx'; ...@@ -2,30 +2,48 @@ import XLSX from 'xlsx';
import Api from '@/plugins/request' import Api from '@/plugins/request'
let henq = {}; let henq = {};
let pdfInfo = '' let pdfInfo = ''
henq.clone = (obj) => { henq.clone = (data)=> {
var that = henq var that = henq
var o const t = that.type(data);
if (typeof obj === 'object') { let o;
if (obj === null) { let i;
o = null let ni;
} else { if (t === "array") {
if (obj instanceof Array) { o = [];
o = [] } else if (t === "object") {
for (var i = 0, len = obj.length; i < len; i++) { o = {};
o.push(that.clone(obj[i]))
}
} else {
o = {}
for (var j in obj) {
o[j] = that.clone(obj[j])
}
}
}
} else { } else {
o = obj return data;
}
if (t === "array") {
for (i = 0, ni = data.length; i < ni; i++) {
o.push(that.clone(data[i]));
}
return o;
}
if (t === "object") {
for (i in data) {
o[i] = that.clone(data[i]);
}
return o;
} }
return o
} }
henq.type=(obj) =>{
const { toString } = Object.prototype;
const map = {
"[object Boolean]": "boolean",
"[object Number]": "number",
"[object String]": "string",
"[object Function]": "function",
"[object Array]": "array",
"[object Date]": "date",
"[object RegExp]": "regExp",
"[object Undefined]": "undefined",
"[object Null]": "null",
"[object Object]": "object",
};
return map[toString.call(obj)];
},
henq.merge = () => { henq.merge = () => {
Object.assign(argments) Object.assign(argments)
} }
......
<template> <template>
<div> <div>
<Card> <Card>
<EditGrid :columns="columns" ref="grid" :items="list"> <EditGrid :columns="columns" ref="grid" :items="list" :drag="true">
<template slot="easySearch" <template slot="easySearch"
><Form ref="formInline" :model="easySearch" inline ><Form ref="formInline" :model="easySearch" inline
><FormItem prop="keys" ><FormItem prop="keys"
...@@ -86,6 +86,26 @@ export default { ...@@ -86,6 +86,26 @@ export default {
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true }, // { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true }, // { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { type: "selection", width: 80, align: "center" }, // { type: "selection", width: 80, align: "center" },
{
key:"drag",
type:"drag",
width:50,
align:'center'
},
{
key: "upId",
width: 400,
title: this.l("upId"),
},
{
key: "title",
title: this.l("title"),
align: "left",
tree: true,
easy: true,
high: true,
},
{ {
key: "type", key: "type",
width: 90, width: 90,
...@@ -106,14 +126,7 @@ export default { ...@@ -106,14 +126,7 @@ export default {
easy: true, easy: true,
high: true, high: true,
}, },
{
key: "title",
title: this.l("title"),
align: "left",
tree: true,
easy: true,
high: true,
},
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
......
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