Commit 4ef8e788 authored by 仇晓婷's avatar 仇晓婷

ting

parent 84b996a9
<template>
<div>
<!-- <grid-layout
:layout="layoutData"
:col-num="12"
:row-height="layoutConfig.height"
:is-draggable="layoutConfig.dialogVisible"
:is-resizable="layoutConfig.dialogVisible"
:is-mirrored="false"
:vertical-compact="true"
:margin="[10, 10]"
:use-css-transforms="true"
>
<grid-item
v-for="(item) in layoutData"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
:key="item.i"
>{{item.i}}</grid-item>
</grid-layout> -->
</div>
</template>
<script>
// import VueGridLayout from "vue-grid-layout";
// const GridLayout = VueGridLayout.GridLayout;
// const GridItem = VueGridLayout.GridItem;
export default {
// props: {
// layoutData: Array
// },
components: {
GridLayout,
GridItem
},
data() {
return {
layoutConfig: {
height: 100,
dialogVisible: true
},
layoutData: [
{
x: 0,
y: 0,
w: 1,
h: 1,
i: "0"
},
{
x: 0,
y: 1,
w: 1,
h: 1,
i: "1"
},
{
x: 0,
y: 2,
w: 1,
h: 1,
i: "2"
},
{
x: 0,
y: 3,
w: 1,
h: 1,
i: "3"
},
{
x: 1,
y: 0,
w: 1,
h: 1,
i: "4"
},
{
x: 1,
y: 1,
w: 1,
h: 1,
i: "5"
},
{
x: 1,
y: 2,
w: 1,
h: 1,
i: "6"
},
{
x: 1,
y: 3,
w: 1,
h: 1,
i: "7"
},
{
x: 2,
y: 0,
w: 1,
h: 1,
i: "8"
},
{
x: 2,
y: 1,
w: 1,
h: 1,
i: "9"
},
{
x: 2,
y: 2,
w: 1,
h: 1,
i: "10"
},
{
x: 2,
y: 3,
w: 1,
h: 1,
i: "11"
},
{
x: 3,
y: 0,
w: 1,
h: 1,
i: "12"
},
{
x: 3,
y: 1,
w: 1,
h: 1,
i: "13"
},
{
x: 3,
y: 2,
w: 1,
h: 1,
i: "14"
},
{
x: 3,
y: 3,
w: 1,
h: 1,
i: "15"
},
{
x: 4,
y: 0,
w: 1,
h: 1,
i: "16"
},
{
x: 4,
y: 1,
w: 1,
h: 1,
i: "17"
},
{
x: 4,
y: 2,
w: 1,
h: 1,
i: "18"
},
{
x: 4,
y: 3,
w: 1,
h: 1,
i: "19"
}
]
};
}
};
</script>
<style lang="less" scoped>
.vue-grid-item {
background: aquamarine;
}
</style>
\ No newline at end of file
<template> <template>
<div class="detail"> <div class="detail">
<Row> <grid-layout
:layout="layoutData"
:col-num="12"
:row-height="layoutConfig.height"
:is-draggable="layoutConfig.dialogVisible"
:is-resizable="layoutConfig.dialogVisible"
:is-mirrored="false"
:vertical-compact="true"
:margin="[10, 10]"
:use-css-transforms="true"
>
<grid-item
v-for="(item) in layoutData"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
:key="item.i"
>{{item.i}}</grid-item>
</grid-layout>
<!-- <Row>
<Filed :span="12" :name="l('projectId')">{{entity.projectId}}</Filed> <Filed :span="12" :name="l('projectId')">{{entity.projectId}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}} </Filed> <Filed :span="12" :name="l('name')">{{entity.name}} </Filed>
<Filed :span="12" :name="l('userId')"><User :value="entity.userId" /></Filed> <Filed :span="12" :name="l('userId')"><User :value="entity.userId" /></Filed>
...@@ -8,54 +29,241 @@ ...@@ -8,54 +29,241 @@
<Filed :span="24" :name="l('status')"><state code="crm.contract.status" :value="entity.status" type="text"></state></Filed> <Filed :span="24" :name="l('status')"><state code="crm.contract.status" :value="entity.status" type="text"></state></Filed>
<Filed :span="24" :name="l('accessory')"><files ref="refFile" :parms="parms" unClosable style="display:inline" /></Filed> <Filed :span="24" :name="l('accessory')"><files ref="refFile" :parms="parms" unClosable style="display:inline" /></Filed>
<Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed> <Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed>
</Row> </Row>-->
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import VueGridLayout from "vue-grid-layout";
const GridLayout = VueGridLayout.GridLayout;
const GridItem = VueGridLayout.GridItem;
export default { export default {
name: 'Add', name: "Add",
components: {
GridLayout,
GridItem
},
data() { data() {
return { return {
layoutConfig: {
height: 100,
dialogVisible: true
},
layoutData: [
{
x: 0,
y: 0,
w: 1,
h: 1,
i: "0"
},
{
x: 0,
y: 1,
w: 1,
h: 1,
i: "1"
},
{
x: 0,
y: 2,
w: 1,
h: 1,
i: "2"
},
{
x: 0,
y: 3,
w: 1,
h: 1,
i: "3"
},
{
x: 1,
y: 0,
w: 1,
h: 1,
i: "4"
},
{
x: 1,
y: 1,
w: 1,
h: 1,
i: "5"
},
{
x: 1,
y: 2,
w: 1,
h: 1,
i: "6"
},
{
x: 1,
y: 3,
w: 1,
h: 1,
i: "7"
},
{
x: 2,
y: 0,
w: 1,
h: 1,
i: "8"
},
{
x: 2,
y: 1,
w: 1,
h: 1,
i: "9"
},
{
x: 2,
y: 2,
w: 1,
h: 1,
i: "10"
},
{
x: 2,
y: 3,
w: 1,
h: 1,
i: "11"
},
{
x: 3,
y: 0,
w: 1,
h: 1,
i: "12"
},
{
x: 3,
y: 1,
w: 1,
h: 1,
i: "13"
},
{
x: 3,
y: 2,
w: 1,
h: 1,
i: "14"
},
{
x: 3,
y: 3,
w: 1,
h: 1,
i: "15"
},
{
x: 4,
y: 0,
w: 1,
h: 1,
i: "16"
},
{
x: 4,
y: 1,
w: 1,
h: 1,
i: "17"
},
{
x: 4,
y: 2,
w: 1,
h: 1,
i: "18"
},
{
x: 4,
y: 3,
w: 1,
h: 1,
i: "19"
}
],
layoutList: [],
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: '必填', trigger: 'blur' }] code: [{ required: true, message: "必填", trigger: "blur" }]
}, },
parms: { parms: {
app: 'contract', app: "contract",
eid: null, eid: null,
name: '', name: "",
field: '' field: ""
},
} }
};
}, },
props: { props: {
eid: Number eid: Number
}, },
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then(r => {
this.entity = r.result this.entity = r.result;
this.parms.eid = r.result.id let list = [
this.$refs.refFile.intFiles() {
this.$emit('on-load') x: 0,
}) y: 0,
w: 1,
h: 1,
i: "akkallf",
label: "销售人员"
},
{
x: 0,
y: 1,
w: 1,
h: 1,
i: "坎坎坷坷",
label: "销售人员"
},
{
x: 0,
y: 2,
w: 1,
h: 1,
i: "H黄金季节",
label: "销售人员"
}
];
this.layoutList = list;
this.parms.eid = r.result.id;
this.$refs.refFile.intFiles();
this.$emit("on-load");
});
}, },
handleClose() { handleClose() {
this.$emit('on-close') this.$emit("on-close");
}, },
l(key) { l(key) {
key = 'Contract' + '.' + key key = "Contract" + "." + key;
return this.$t(key) return this.$t(key);
} }
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v != 0) { if (v != 0) {
this.load(v) this.load(v);
} }
} }
} }
} };
</script> </script>
<style lang="less" scoped>
.vue-grid-item {
background: aquamarine;
}
</style>
...@@ -38,6 +38,7 @@ import FilesList from '@/components/page/filesList.vue' ...@@ -38,6 +38,7 @@ import FilesList from '@/components/page/filesList.vue'
import DataGrid from '@/components/page/dataGrid.vue' import DataGrid from '@/components/page/dataGrid.vue'
import TreeGrid from '@/components/page/treeGrid/index.vue' import TreeGrid from '@/components/page/treeGrid/index.vue'
import Filed from '@/components/page/filed.vue' import Filed from '@/components/page/filed.vue'
// import Layout from '@/components/page/layout.vue'
import User from '@/components/page/user.vue' import User from '@/components/page/user.vue'
import op from '@/components/page/opration.vue' import op from '@/components/page/opration.vue'
import ProductNumberSelect from '@/components/page/productNumberSelect.vue' import ProductNumberSelect from '@/components/page/productNumberSelect.vue'
...@@ -79,6 +80,7 @@ Vue.component("FilesList", FilesList) ...@@ -79,6 +80,7 @@ Vue.component("FilesList", FilesList)
Vue.component("DataGrid", DataGrid) Vue.component("DataGrid", DataGrid)
Vue.component("TreeGrid", TreeGrid) Vue.component("TreeGrid", TreeGrid)
Vue.component("Filed", Filed) Vue.component("Filed", Filed)
// Vue.component("Layout", Layout)
Vue.component("UserSelect", UserSelect) Vue.component("UserSelect", UserSelect)
Vue.component("RoleSelect", RoleSelect) Vue.component("RoleSelect", RoleSelect)
Vue.component("UserExamSelect", UserExamSelect) Vue.component("UserExamSelect", UserExamSelect)
...@@ -95,8 +97,8 @@ Vue.component("DTSearch", DTSearch) ...@@ -95,8 +97,8 @@ Vue.component("DTSearch", DTSearch)
//注入mock //注入mock
// require("../mock") // require("../mock")
Vue.prototype.$api=request; Vue.prototype.$api = request;
Vue.prototype.$http=Api; Vue.prototype.$http = Api;
Vue.prototype.$u = Henq; Vue.prototype.$u = Henq;
export default ({ export default ({
app, app,
...@@ -157,8 +159,8 @@ export default ({ ...@@ -157,8 +159,8 @@ export default ({
}) })
} }
Vue.directive('auth',{ Vue.directive('auth', {
inserted (el, binding, vnode) { inserted(el, binding, vnode) {
const { value } = binding; const { value } = binding;
const access = store.state.admin.user.info.access; const access = store.state.admin.user.info.access;
...@@ -169,7 +171,7 @@ export default ({ ...@@ -169,7 +171,7 @@ export default ({
} }
} }
} }
} ) })
Vue.directive('paste', { Vue.directive('paste', {
bind(el, binding, vnode) { bind(el, binding, vnode) {
el.addEventListener('paste', function (event) { //这里直接监听元素的粘贴事件 el.addEventListener('paste', function (event) { //这里直接监听元素的粘贴事件
......
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