Commit 524601d5 authored by renjintao's avatar renjintao

import/index

parent 4466a9f2
<template> <template>
<div class="myBug"> <div class="myBug">
<Tabs :animated="false" @on-click="tab"> <Tabs :animated="false" @on-click="tab">
<TabPane label="我的"></TabPane> <TabPane label="我的"></TabPane>
<TabPane label="所有"></TabPane> <TabPane label="所有"></TabPane>
</Tabs> </Tabs>
<DataGrid <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" @on-selection-change="selectInfo" :height="gridHeight">
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
@on-selection-change="selectInfo"
:height="gridHeight"
>
<template slot="easySearch"> <template slot="easySearch">
<Form inline > <Form inline>
<FormItem> <FormItem>
<dictionary <dictionary code="Test.bug.status" v-model="easySearch.status.value" style="width:400px;" multiple></dictionary>
code="Test.bug.status"
v-model="easySearch.status.value"
style="width:400px;"
multiple
></dictionary>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Input <Input search enter-button placeholder="请输入bug标题或地址" @on-search="search" v-model="easySearch.keys.value" />
search
enter-button
placeholder="请输入bug标题或地址"
@on-search="search"
v-model="easySearch.keys.value"
/>
</FormItem> </FormItem>
</Form> </Form>
</template> </template>
...@@ -39,13 +21,7 @@ ...@@ -39,13 +21,7 @@
<template slot="batch"> <template slot="batch">
<Form :model="formMyCheck" :label-width="5" :rules="ruleValidate" inline ref="formValidate"> <Form :model="formMyCheck" :label-width="5" :rules="ruleValidate" inline ref="formValidate">
<FormItem> <FormItem>
<dictionary <dictionary code="Test.but.statusOper" v-model="selectBatch" type="radio" @on-change="statuChange" ref="dicradio"></dictionary>
code="Test.but.statusOper"
v-model="selectBatch"
type="radio"
@on-change="statuChange"
ref="dicradio"
></dictionary>
</FormItem> </FormItem>
<FormItem v-if="selectBatch == 5" label prop="selectAlloter"> <FormItem v-if="selectBatch == 5" label prop="selectAlloter">
<UserSelect ref="userSelected" v-model="alloter" @on-change="changeUserSelect" /> <UserSelect ref="userSelected" v-model="alloter" @on-change="changeUserSelect" />
...@@ -78,8 +54,9 @@ ...@@ -78,8 +54,9 @@
<Button type="primary" @click="upSave">确定</Button> <Button type="primary" @click="upSave">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "@/libs/bug"; import Api from "@/libs/bug";
import edit from "./component/add"; import edit from "./component/add";
...@@ -97,8 +74,14 @@ export default { ...@@ -97,8 +74,14 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: "title,pagePath", value: "" }, keys: {
status: { op: "In", value: [1,5,0] }, op: "title,pagePath",
value: ""
},
status: {
op: "In",
value: [1, 5, 0]
},
creatorUserId: { creatorUserId: {
op: "Equal", op: "Equal",
value: userInfo.userId value: userInfo.userId
...@@ -113,8 +96,7 @@ export default { ...@@ -113,8 +96,7 @@ export default {
pageSizeOpts: [20, 50, 100], pageSizeOpts: [20, 50, 100],
pageSize: 20, pageSize: 20,
tabIndex: 1, tabIndex: 1,
columns: [ columns: [{
{
type: "selection", type: "selection",
width: 60, width: 60,
align: "center" align: "center"
...@@ -136,8 +118,7 @@ export default { ...@@ -136,8 +118,7 @@ export default {
tooltip: true, tooltip: true,
render: (h, params) => render: (h, params) =>
h( h(
"a", "a", {
{
style: {}, style: {},
on: { on: {
click: () => { click: () => {
...@@ -154,8 +135,7 @@ export default { ...@@ -154,8 +135,7 @@ export default {
tooltip: true, tooltip: true,
render: (h, params) => render: (h, params) =>
h( h(
"a", "a", {
{
style: {}, style: {},
on: { on: {
click: () => { click: () => {
...@@ -170,15 +150,7 @@ export default { ...@@ -170,15 +150,7 @@ export default {
title: this.l("status"), title: this.l("status"),
key: "status", key: "status",
width: 100, width: 100,
render: (h, params) => { code: 'Test.bug.status',
return h("state", {
props: {
code: "Test.bug.status",
type: "text",
value: params.row.status + ""
}
});
}
}, },
{ {
title: this.l("creationTime"), title: this.l("creationTime"),
...@@ -209,15 +181,14 @@ export default { ...@@ -209,15 +181,14 @@ export default {
width: 120 width: 120
}, },
{ {
key:"action", key: "action",
title: "操作", title: "操作",
align: "center", align: "center",
width: 180, width: 180,
render: (h, params) => render: (h, params) =>
h("div", [ h("div", [
h( h(
"Button", "Button", {
{
props: { props: {
type: "text", type: "text",
size: "small" size: "small"
...@@ -234,8 +205,7 @@ export default { ...@@ -234,8 +205,7 @@ export default {
"解决" "解决"
), ),
h( h(
"Button", "Button", {
{
props: { props: {
type: "text", type: "text",
size: "small" size: "small"
...@@ -255,11 +225,22 @@ export default { ...@@ -255,11 +225,22 @@ export default {
} }
], ],
statusList: [ statusList: [{
{ name: "确认", value: "1" }, name: "确认",
{ name: "解决", value: "2" }, value: "1"
{ name: "冻结", value: "4" }, },
{ name: "关闭", value: "3" } {
name: "解决",
value: "2"
},
{
name: "冻结",
value: "4"
},
{
name: "关闭",
value: "3"
}
], ],
modalEdit: false, modalEdit: false,
modalDetail: false, modalDetail: false,
...@@ -284,19 +265,20 @@ export default { ...@@ -284,19 +265,20 @@ export default {
selectAlloter: null selectAlloter: null
}, },
ruleValidate: { ruleValidate: {
selectAlloter: [ selectAlloter: [{
{
required: true, required: true,
message: "请选择驳指派人", message: "请选择驳指派人",
type: "number", type: "number",
trigger: "change" trigger: "change"
} }]
]
} }
}; };
}, },
computed: {}, computed: {},
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" :fullscreen="full" footer-hide> <Modal v-model="modal" :title="title" width="1200" :fullscreen="full" :footer-hide="initBtn">
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
...@@ -48,6 +48,7 @@ export default { ...@@ -48,6 +48,7 @@ export default {
}, },
modal: false, modal: false,
full: false, full: false,
initBtn: true,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
...@@ -213,6 +214,7 @@ export default { ...@@ -213,6 +214,7 @@ export default {
add() { add() {
this.curId = 0; this.curId = 0;
this.full = false; this.full = false;
this.initBtn = true;
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
...@@ -227,6 +229,7 @@ export default { ...@@ -227,6 +229,7 @@ export default {
this.curId = id; this.curId = id;
this.title = "详情"; this.title = "详情";
this.full = false; this.full = false;
this.initBtn = false;
this.detail = () => import("./detail"); this.detail = () => import("./detail");
this.modal = true; this.modal = true;
}, },
...@@ -234,6 +237,7 @@ export default { ...@@ -234,6 +237,7 @@ export default {
this.curId = id; this.curId = id;
this.title = "编辑"; this.title = "编辑";
this.full = false; this.full = false;
this.initBtn = true;
this.detail = () => import("./edit"); this.detail = () => import("./edit");
this.modal = true; this.modal = true;
}, },
...@@ -241,6 +245,7 @@ export default { ...@@ -241,6 +245,7 @@ export default {
this.curId = row.id; this.curId = row.id;
this.title = "处理文件:" + row.name; this.title = "处理文件:" + row.name;
this.full = true; this.full = true;
this.initBtn = true;
this.detail = () => import("./process"); this.detail = () => import("./process");
this.modal = true; this.modal = true;
}, },
......
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