master
loveflow 9 months ago
parent de64853cc2
commit 4db8e935d1

@ -40,7 +40,7 @@
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": false,
"root": true,
"env": {
"node": true
},
@ -51,7 +51,9 @@
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
"rules": {
"no-unused-vars": "off"
}
},
"browserslist": [
"> 1%",

@ -1,12 +1,42 @@
.fontWeight {
font-weight: bold;
}
.textGreen {
color: green;
}
.textRed {
color: red;
}
.textBlue {
color: blue;
.loveflow {
/* 定位 START */
.absolute {
position: absolute;
}
.relative {
position: relative;
}
.flex {
display: flex;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
/* 定位 END */
/* 间距 START*/
.mt6 {
margin-top: 6px;
}
.mr6 {
margin-right: 6px;
}
/* 间距 END*/
/* 字体 START */
.fontWeight {
font-weight: bold;
}
.textGreen {
color: green;
}
.textRed {
color: red;
}
.textBlue {
color: blue;
}
/* 字体 END */
}

@ -0,0 +1,71 @@
<template>
<div class="chartline">
<div ref="dom" class="chartline1"></div>
<slot></slot>
</div>
</template>
<script>
export default {
props: {
echartdata: {},
notMerge: {
type: Boolean,
default: false,
},
},
data() {
return {
dom: null,
};
},
methods: {
resize() {
this.dom.resize();
},
},
mounted() {
this.$nextTick(() => {
// this.dom = echarts.init(this.$refs.dom, "dark");
window.addEventListener("resize", this.resize, false);
setTimeout(() => {
this.dom = this.$echarts.init(this.$refs.dom);
this.dom.setOption(this.echartdata, this.notMerge);
}, 100);
});
},
beforeDestroy() {
this.dom.dispose();
window.removeEventListener("resize", () => {}, false);
},
watch: {
echartdata: {
handler(newval) {
// setTimeout(() => {
if (this.dom) {
this.dom.setOption(this.echartdata, this.notMerge);
}
// }, 1000);
},
deep: true,
// immediate: true,
},
},
};
</script>
<style scoped lang="less">
.chartline {
position: relative;
width: 100%;
height: 100%;
.chartline1 {
position: absolute;
z-index: 10;
width: 100%;
height: 100%;
}
}
</style>

@ -6,9 +6,9 @@
:before-close="handleClose"
>
<el-form ref="relForm" :model="model" :label-width="labelWidth">
<a-row>
<a-col
:span="24"
<el-row>
<el-col
:span="item.itemAttrs.span || 22"
v-for="(item, index) in formItems"
:key="index + item.attrs.model"
>
@ -90,8 +90,8 @@
style="width: 100%"
></el-date-picker>
</template>
</el-form-item> </a-col
></a-row>
</el-form-item> </el-col
></el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -104,9 +104,9 @@
export default {
props: {
width: {
type: Number,
type: String,
default: () => {
return 800;
return "800px";
},
},
formItems: {

@ -25,7 +25,7 @@ const tableListMixins = {
order: "desc",
},
/* table加载状态 */
loading: false,
//loading: false,
/* table选中keys*/
selectedRowKeys: [],
/* table选中records*/

@ -16,6 +16,10 @@ import lkyPagination from "./components/publicModule/lkyPagination" // 本组件
import * as cusRule from '@/loveflow/rules'
import { registerPlugins } from '@/loveflow/plugins/index'
import FormDialog from '@/loveflow/components/modal/formDialog.vue'
import * as echarts from "echarts";
Vue.prototype.$echarts = echarts;
Vue.prototype.$rules = cusRule
registerPlugins(Vue)

@ -34,7 +34,6 @@ request.interceptors.request.use(config => {
Promise.reject(error)
})
// response 拦截器
// 可以在接口响应后统一处理结果
request.interceptors.response.use(

@ -1,9 +1,76 @@
<template>
<div>
<div class="search">11</div>
<el-button @click="add"></el-button>
<form-dialog
ref="formDialog"
:form-items="formItems"
@dialogSubmit="dialogSubmit"
>
<template v-slot:fzrslot="{ scope }">
{{ scope }}
</template>
</form-dialog>
</div>
</template>
<script>
import { deleteAction, getAction, downFile } from "@/loveflow/api/manage";
export default {
data() {
return {
formItems: [
{
type: "input",
itemAttrs: {
label: "车间编码",
rules: this.$rules.requiredItem,
},
attrs: {
model: "no",
value: "",
placeholder: "",
disabled: true,
},
},
{
type: "textarea",
itemAttrs: {
label: "备注",
},
attrs: {
model: "remark",
value: "",
placeholder: "",
rows: 4,
},
},
{
type: "slot",
slot: "fzrslot",
itemAttrs: {
label: "车间负责人",
},
attrs: {
model: "directorPerson",
value: "",
placeholder: "",
},
},
],
};
},
methods: {
add() {
this.$refs.formDialog.openDialog();
},
dialogSubmit() {},
},
};
</script>
<style lang="scss" scoped>
.search {
width: vw(400);

Loading…
Cancel
Save