master
loveflow 9 months ago
parent de64853cc2
commit 4db8e935d1

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

@ -1,3 +1,31 @@
.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 { .fontWeight {
font-weight: bold; font-weight: bold;
} }
@ -10,3 +38,5 @@
.textBlue { .textBlue {
color: blue; 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" :before-close="handleClose"
> >
<el-form ref="relForm" :model="model" :label-width="labelWidth"> <el-form ref="relForm" :model="model" :label-width="labelWidth">
<a-row> <el-row>
<a-col <el-col
:span="24" :span="item.itemAttrs.span || 22"
v-for="(item, index) in formItems" v-for="(item, index) in formItems"
:key="index + item.attrs.model" :key="index + item.attrs.model"
> >
@ -90,8 +90,8 @@
style="width: 100%" style="width: 100%"
></el-date-picker> ></el-date-picker>
</template> </template>
</el-form-item> </a-col </el-form-item> </el-col
></a-row> ></el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -104,9 +104,9 @@
export default { export default {
props: { props: {
width: { width: {
type: Number, type: String,
default: () => { default: () => {
return 800; return "800px";
}, },
}, },
formItems: { formItems: {

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

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

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

@ -1,9 +1,76 @@
<template> <template>
<div> <div>
<div class="search">11</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> </div>
</template> </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> <style lang="scss" scoped>
.search { .search {
width: vw(400); width: vw(400);

Loading…
Cancel
Save