提交 8672ec1a 编写于 作者: sq3536's avatar sq3536

json

上级 71a3a8e1
......@@ -18,10 +18,11 @@
"@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"vuedraggable": "^2.23.2",
"async-validator": "^3.3.0",
"@json-editor/json-editor": "1.4.0-beta.0",
"@popperjs/core": "^2.4.3",
"async-validator": "^3.3.0",
"axios": "^0.19.1",
"bootstrap-vue": "^2.18.1",
"core-js": "^3.4.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
......@@ -31,11 +32,15 @@
"ibiz-vue-lib": "^0.1.13",
"ibiz-vue-pivottable": "^1.0.6",
"interactjs": "^1.9.4",
"jquery": "^3.4.1",
"js-object-pretty-print": "^0.3.0",
"moment": "^2.24.0",
"path-to-regexp": "^6.1.0",
"qs": "^6.9.1",
"rxjs": "^6.5.4",
"select2": "^4.0.13",
"tinymce": "4.8.5",
"v-jsoneditor": "^1.4.1",
"view-design": "4.2.0",
"vue": "^2.6.10",
"vue-amap": "^0.5.10",
......@@ -44,11 +49,8 @@
"vue-i18n": "^8.15.3",
"vue-property-decorator": "^8.3.0",
"vue-router": "^3.1.3",
"vuedraggable": "^2.23.2",
"vuex": "^3.1.2",
"@json-editor/json-editor": "1.4.0-beta.0",
"js-object-pretty-print": "^0.3.0",
"bootstrap-vue": "^2.18.1",
"v-jsoneditor": "^1.4.1",
"xlsx": "^0.15.6"
},
"devDependencies": {
......@@ -69,10 +71,6 @@
"mockjs": "^1.1.0",
"script-loader": "^0.7.2",
"typescript": "^4.0.3",
"vue-template-compiler": "^2.6.10"
}
}
......@@ -68,7 +68,7 @@ export default class AppFormJsonDaChart extends AppFormJson {
"links": [
{
"rel": "查看",
"href": "javascript:window.showdetail('dametric-edit-view',{'dametrics':'{{self}}'})"// "/dstweb/index.html#/common_index/analyse_dametriceditview/srfkey={{self}}"
"href": "javascript:window.showdetail('dametric-edit-view',{'dametric':'{{self}}'})"// "/dstweb/index.html#/common_index/analyse_dametriceditview/srfkey={{self}}"
}
],
options: {
......
......@@ -13,8 +13,11 @@ import { Http,Util } from '@/utils';
import JSONEditor from "@json-editor/json-editor";
import BootstrapVue from "bootstrap-vue";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css";
import "select2/dist/js/select2.js";
import "select2/dist/css/select2.min.css"
import 'jquery/dist/jquery.min.js'
import $ from 'jquery'
import "../app-form-json/app-form-json.less";
......@@ -109,20 +112,35 @@ JSONEditor.defaults.editors.selectnew = JSONEditor.defaults.editors.select.exte
var new_items = [];
if(p0)
{
Http.getInstance().get(url,{},false)
.then((response: any) => {
if(response.status === 200 && response.data) {
response.data.forEach((item: any)=>{
{
const token = window.localStorage.getItem('token');
$.ajax({
url: url,
headers: {
"Authorization":"Bearer "+token//此处放置请求到的用户token
},
type: 'get',
contentType: 'application/json',
dataType: 'text',
async: false, // 同步
success: function (result) {
var resObj = JSON.parse(result);
resObj.forEach((item: any)=>{
new_items.push(item);
});
}
}).catch((error: any) => {
console.log(error)
})
new_items.unshift(JSON.parse(JSON.stringify(items[0])));
items = new_items;
},
error: function (result) {
}
});
console.log(items);
}
else
{
new_items.unshift(JSON.parse(JSON.stringify(items[0])));
items = new_items;
}
new_items.unshift(JSON.parse(JSON.stringify(items[0])));
items = new_items;
}
if(this.enumSource[i].filterText)
{
......@@ -205,7 +223,32 @@ JSONEditor.defaults.editors.selectnew = JSONEditor.defaults.editors.select.exte
this.setupSelect2();
}
this._super();
// {
// var vars;
// if(this.header_template) {
// vars = $extend(this.getWatchedFieldValues(),{
// key: this.key,
// i: this.key,
// i0: (this.key*1),
// i1: (this.key*1+1),
// title: this.getTitle()
// });
// var header_text = this.header_template(vars);
// if(header_text !== this.header_text) {
// this.header_text = header_text;
// this.updateHeaderText();
// this.notify();
// //this.fireChangeHeaderEvent();
// }
// }
if(this.link_watchers.length) {
vars = this.getWatchedFieldValues();
for(var i=0; i<this.link_watchers.length; i++) {
this.link_watchers[i](vars);
}
}
// }
},
getLink: function(data) {
var holder, link;
......@@ -537,7 +580,7 @@ export default class AppFormJson extends Vue {
width: 0,
title: '查看',
};
this.$appmodal.openModal(view, arg,{});
this.$appmodal.openModal(view, arg, {});
}
}
......
......@@ -3,6 +3,10 @@ import AppAvueCrud from './components/app-avue-crud/app-avue-crud.vue'
import AppFormJson from './components/app-form-json/app-form-json.vue'
import AppFormJsonDaChart from './components/app-form-json/app-form-json-da-chart.vue'
import AppTreeselectRefreshview from './components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
import 'jquery/dist/jquery.min.js'
import $ from 'jquery'
window["$"] = $
window["jQuery"] = $
export const UserComponent = {
install(v: any, opt: any) {
v.component('avue-component', AvueComponent);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册