提交 3e43dc30 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码 [TrainSys,网页端]

上级 62a3cb09
......@@ -6,21 +6,22 @@
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"preview": "vite preview --host 0.0.0.0",
"lint": "eslint 'src/**/*.ts' 'src/**/*.vue'",
"lint:style": "stylelint 'src/**/*.scss'"
},
"dependencies": {
"@floating-ui/dom": "^1.0.11",
"@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.57",
"@ibiz-template/controller": "^0.0.1-beta.59",
"@ibiz-template/core": "^0.0.1-beta.57",
"@ibiz-template/model": "^0.0.1-beta.55",
"@ibiz-template/runtime": "^0.0.1-beta.57",
"@ibiz-template/service": "^0.0.1-beta.57",
"@ibiz-template/theme": "^0.0.1-beta.54",
"@ibiz-template/vue-util": "^0.0.1-beta.57",
"@ibiz-template/model": "^0.0.1-beta.59",
"@ibiz-template/runtime": "^0.0.1-beta.59",
"@ibiz-template/service": "^0.0.1-beta.59",
"@ibiz-template/theme": "^0.0.1-beta.59",
"@ibiz-template/vue-util": "^0.0.1-beta.59",
"@ibiz/dynamic-model-api": "^2.1.17",
"@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.7",
"echarts": "^5.4.2",
"lodash-es": "^4.17.21",
......
此差异已折叠。
......@@ -12,6 +12,7 @@
"lodash-es": "../js/lodash/4.17.21/lodash.min.js",
"qx-util": "../js/qx-util.min.js",
"echarts": "../js/echarts/5.4.2/echarts.min.js",
"@riophae/vue-treeselect": "../js/@riophae/vue-treeselect/0.4.0/vue-treeselect.umd.min.js",
"@ibiz/dynamic-model-api": "../js/ibiz-dynamic-model-api.system.min.js",
"@ibiz-template/command": "../js/ibiz-template-command.system.min.js",
"@ibiz-template/core": "../js/ibiz-template-core.system.min.js",
......
var s = Object.defineProperty;
var i = (r, e, t) => e in r ? s(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
var o = (r, e, t) => (i(r, typeof e != "symbol" ? e + "" : e, t), t);
import { defineComponent as c, getCurrentInstance as a } from "vue";
import { useViewController as h } from "@ibiz-template/vue-util";
import { Neuron as l, ViewNerve as d, ViewController as u } from "@ibiz-template/controller";
class p extends l {
}
class m extends d {
constructor() {
super(...arguments);
o(this, "chart");
}
createNeuron() {
return new p(this.bindAbility());
}
inclusive(t) {
return t === "chart" || super.inclusive(t);
}
connect(t, n) {
super.connect(t, n), t === "chart" && (this.chart = n, this.chart.evt.on("destroyed", () => {
this.chart = void 0;
}));
}
destroy() {
super.destroy(), this.chart = void 0;
}
}
class v extends u {
createNerve() {
return new m(this);
}
async onInit() {
await super.onInit();
const { chart: e } = this.model;
e && (this.providers[e.name] = await ibiz.register.control.get(e)), this.nerve.self.evt.on("mounted", () => {
this.model.source.loadDefault && this.load();
});
}
/**
* 视图加载方法
*
* @return {*} {Promise<IData[]>}
* @memberof ChartViewController
*/
async load() {
const { chart: e } = this.nerve;
return e.call.load();
}
/**
* 刷新视图
*
* @author zhanghengfeng
* @date 2023-04-07 17:04:41
* @return {*} {Promise<void>}
*/
async refresh() {
this.load();
}
}
function f(r, e) {
return h(
r,
(t, n) => new v(e, t, n)
);
}
const V = c({
props: {
context: Object,
params: {
type: Object,
default: () => ({})
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
}
},
setup(r) {
const {
proxy: e
} = a();
return {
c: f(e, r.modelPath)
};
},
render(r) {
let e = null;
if (this.c.complete) {
const {
chart: t
} = this.c.model;
this.c.providers[t.name] && (e = r(this.c.providers[t.name].component, {
props: {
modelData: t,
context: this.c.context,
params: this.c.params
},
on: {
neuronInit: this.c.nerve.onNeuronInit(t.name)
}
}));
}
return r("view-base", {
attrs: {
controller: this.c
}
}, [e]);
}
});
export {
V as default
};
System.register(["vue","@ibiz-template/vue-util","@ibiz-template/controller"],(function(e,t){"use strict";var r,n,s,o,i,c;return{setters:[e=>{r=e.defineComponent,n=e.getCurrentInstance},e=>{s=e.useViewController},e=>{o=e.Neuron,i=e.ViewNerve,c=e.ViewController}],execute:function(){class t extends o{}class a extends i{chart;createNeuron(){return new t(this.bindAbility())}inclusive(e){return"chart"===e||super.inclusive(e)}connect(e,t){super.connect(e,t),"chart"===e&&(this.chart=t,this.chart.evt.on("destroyed",(()=>{this.chart=void 0})))}destroy(){super.destroy(),this.chart=void 0}}class l extends c{createNerve(){return new a(this)}async onInit(){await super.onInit();const{chart:e}=this.model;e&&(this.providers[e.name]=await ibiz.register.control.get(e)),this.nerve.self.evt.on("mounted",(()=>{this.model.source.loadDefault&&this.load()}))}async load(){const{chart:e}=this.nerve;return e.call.load()}}e("default",r({props:{context:Object,params:{type:Object,default:()=>({})},modelPath:{type:String,required:!0},modal:{type:Object}},setup(e){const{proxy:t}=n();var r,o;return{c:(r=t,o=e.modelPath,s(r,((e,t)=>new l(o,e,t))))}},render(e){let t=null;if(this.c.complete){const{chart:r}=this.c.model;this.c.providers[r.name]&&(t=e(this.c.providers[r.name].component,{props:{modelData:r,context:this.c.context,params:this.c.params},on:{neuronInit:this.c.nerve.onNeuronInit(r.name)}}))}return e("view-base",{attrs:{controller:this.c}},[t])}}))}}}));
System.register(["vue","@ibiz-template/vue-util","@ibiz-template/controller"],(function(e,t){"use strict";var r,n,s,o,i,c;return{setters:[e=>{r=e.defineComponent,n=e.getCurrentInstance},e=>{s=e.useViewController},e=>{o=e.Neuron,i=e.ViewNerve,c=e.ViewController}],execute:function(){class t extends o{}class a extends i{chart;createNeuron(){return new t(this.bindAbility())}inclusive(e){return"chart"===e||super.inclusive(e)}connect(e,t){super.connect(e,t),"chart"===e&&(this.chart=t,this.chart.evt.on("destroyed",(()=>{this.chart=void 0})))}destroy(){super.destroy(),this.chart=void 0}}class l extends c{createNerve(){return new a(this)}async onInit(){await super.onInit();const{chart:e}=this.model;e&&(this.providers[e.name]=await ibiz.register.control.get(e)),this.nerve.self.evt.on("mounted",(()=>{this.model.source.loadDefault&&this.load()}))}async load(){const{chart:e}=this.nerve;return e.call.load()}async refresh(){this.load()}}e("default",r({props:{context:Object,params:{type:Object,default:()=>({})},modelPath:{type:String,required:!0},modal:{type:Object}},setup(e){const{proxy:t}=n();var r,o;return{c:(r=t,o=e.modelPath,s(r,((e,t)=>new l(o,e,t))))}},render(e){let t=null;if(this.c.complete){const{chart:r}=this.c.model;this.c.providers[r.name]&&(t=e(this.c.providers[r.name].component,{props:{modelData:r,context:this.c.context,params:this.c.params},on:{neuronInit:this.c.nerve.onNeuronInit(r.name)}}))}return e("view-base",{attrs:{controller:this.c}},[t])}}))}}}));
......@@ -19,10 +19,10 @@ const d = {
install(r) {
m.loadStyle(["/style.css"]), r.component(
"ChartControl",
() => import("./chart-control-ede059a5.js")
() => import("./chart-control-f9171bdf.js")
), ibiz.register.control.register(s.CHART, new c()), r.component(
"ChartView",
() => import("./chart-view-4d8fd435.js")
() => import("./chart-view-2e05f0a8.js")
), ibiz.register.view.register(
a.DE_CHART_VIEW,
new p()
......
@charset "UTF-8";.ibiz-chart{width:100%;height:100%;overflow:auto}.ibiz-chart .ibiz-chart-content{width:100%;height:100%}.chart-tooltip .chart-tooltip-container{width:141px;padding:10px 12px 6px 8px;background:rgba(255,255,255,.45);border-radius:6px;backdrop-filter:blur(3px)}.chart-tooltip .chart-tooltip-container .chart-tooltip-title{font-size:14px;font-weight:700;line-height:19px;color:#666}.chart-tooltip .chart-tooltip-container .chart-tooltip-item{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.chart-tooltip .chart-tooltip-container .chart-tooltip-item .chart-tooltip-item-name,.chart-tooltip .chart-tooltip-container .chart-tooltip-item .chart-tooltip-item-number{font-size:12px;line-height:16px;color:#666}
@charset "UTF-8";.ibiz-chart{width:100%;height:100%;overflow:auto;position:relative}.ibiz-chart .ibiz-chart-content{width:100%;height:100%}.ibiz-chart .ibiz-chart-empty-content{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.chart-tooltip .chart-tooltip-container{width:141px;padding:10px 12px 6px 8px;background:rgba(255,255,255,.45);border-radius:6px;backdrop-filter:blur(3px)}.chart-tooltip .chart-tooltip-container .chart-tooltip-title{font-size:14px;font-weight:700;line-height:19px;color:#666}.chart-tooltip .chart-tooltip-container .chart-tooltip-item{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.chart-tooltip .chart-tooltip-container .chart-tooltip-item .chart-tooltip-item-name,.chart-tooltip .chart-tooltip-container .chart-tooltip-item .chart-tooltip-item-number{font-size:12px;line-height:16px;color:#666}
/* eslint-disable no-nested-ternary */
import { ref, watch, defineComponent } from 'vue';
import {
getDatePickerProps,
......@@ -20,16 +21,21 @@ export const IBizDatePicker = defineComponent({
const type = ref('date');
const format = ref('yyyy-MM-dd');
const isTimePicker = ref(false);
switch (editorModel.editorType) {
case 'DATEPICKEREX':
case 'DATEPICKEREX_NOTIME':
type.value = 'date';
break;
case 'DATEPICKEREX_NODAY':
case 'DATEPICKEREX_NODAY_NOSECOND':
isTimePicker.value = true;
type.value = 'time';
break;
case 'DATEPICKEREX_HOUR':
case 'DATEPICKEREX_MINUTE':
case 'DATEPICKEREX_SECOND':
case 'DATEPICKEREX_NODAY':
case 'DATEPICKEREX_NODAY_NOSECOND':
case 'DATEPICKEREX_NOSECOND':
case 'DATEPICKER':
default:
......@@ -90,6 +96,7 @@ export const IBizDatePicker = defineComponent({
handleChange,
onOpenChange,
inputRef,
isTimePicker,
};
},
render() {
......@@ -103,6 +110,18 @@ export const IBizDatePicker = defineComponent({
>
{this.readonly ? (
this.formatValue
) : this.isTimePicker ? (
<i-time-picker
ref='inputRef'
transfer
type={this.type}
format={this.format}
placeholder={this.c!.placeHolder}
value={this.value}
on-on-open-change={this.onOpenChange}
on-on-change={this.handleChange}
disabled={this.disabled}
></i-time-picker>
) : (
<i-CalendarPicker
ref='inputRef'
......
......@@ -39,6 +39,7 @@ import {
AutoComplete,
InputNumber,
Drawer,
TimePicker,
// 绑在原型上
LoadingBar,
Notice,
......@@ -107,5 +108,6 @@ export const IViewRegister = {
}
}
});
v.component('ITimePicker', TimePicker);
},
};
......@@ -30,6 +30,7 @@ export default defineConfig({
'lodash-es',
'qx-util',
'echarts',
'@riophae/vue-treeselect',
'@ibiz/dynamic-model-api',
'@ibiz-template/command',
'@ibiz-template/core',
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册