Commit 052957f9 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 9dc65f96 dfd83c51
<template>
<ul class="actions">
<li class="item" v-for="(li, i) in items" @click="detail(li)">
<span v-if="mode == 'text'" class="text" v-text="li.label"></span>
<Tooltip v-if="mode == 'icon'" :content="li.label"
><Icon :type="li.icon"
/></Tooltip>
<div v-else class="ib">
<Icon type="li.icon" />
<span class="text" v-text="li.label"></span>
</div>
</li>
</ul>
</template>
<script>
export default {
name: "actions",
data() {
return {};
},
props: {
row: {
type: Object,
},
items: {
type: Array,
default: () => {
return [
{ label: "复制", icon: "md-copy", vclick: "" },
{ label: "新增", icon: "md-add", vclick: "" },
{ label: "删除", icon: "md-trash", vclick: "" },
{ label: "移动", icon: "md-move", vclick: "" },
{ label: "派发", icon: "ios-alarm", vclick: "" },
];
},
},
mode: {
// 显示类型
type: String,
validator: (value) => {
// 这个值必须匹配下列字符串中的一个
return ["icon", "text", "icon-text"].indexOf(value) !== -1;
},
default: "icon",
},
disabled: {
type: Boolean,
default: true,
},
max: {
type: Number,
default: 3,
},
},
methods: {
detail(li) {
if (li.confirm) {
var msg = li.confirm;
if (li.confirm === true) {
msg = `确定要${li.label}吗?`;
}
this.$Modal.confirm({
title: "操作确认",
content: msg,
onOk: () => {
this.$emit("on-click", this.row, li);
},
});
} else {
this.$emit("on-click", this.row, li);
}
},
},
};
</script>
<style lang="less">
.actions {
ul {
li {
float: left;
list-style: none;
width: 20px;
height: 20px;
text-align: center;
margin-left: 5px;
color: red;
}
}
}
</style>
\ No newline at end of file
...@@ -1818,27 +1818,24 @@ export default { ...@@ -1818,27 +1818,24 @@ export default {
type: '类型', type: '类型',
attachment: '附件', attachment: '附件',
executor: '执行人', executor: '执行人',
},
project_main: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '标题',
note: '备注',
state: '状态',
type: '分类',
picture: '图片',
attachment: '附件',
phase: '阶段',
startDate: '开始日期',
endDate: '结束日期',
businessUnits: '业务单位',
} }
,
project_main: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '标题',
note: '备注',
state: '状态',
type: '分类',
picture: '图片',
attachment: '附件',
phase: '阶段',
startDate: '开始日期',
endDate: '结束日期',
businessUnits: '业务单位',
}
} }
<template> <template>
<span class="i-layout-header-trigger i-layout-header-trigger-min"> <span class="i-layout-header-trigger i-layout-header-trigger-min">
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown"> <Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
<span @click="openModelBugAdd"> <span @click="openModelBugAdd">
<Badge :count="bugCount === 0 ? null : bugCount" :overflow-count="99" :offset="[10, 0]"> <Badge :count="bugCount === 0 ? null : bugCount" :overflow-count="99" :offset="[10, 0]">
<Icon type="ios-bug" size="18" /> <Icon type="ios-bug" size="18" />
</Badge> </Badge>
</span> </span>
<Icon type="md-arrow-dropdown"></Icon> <Icon type="md-arrow-dropdown"></Icon>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem name="bug">bug列表</DropdownItem> <DropdownItem name="bug">bug列表</DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
<Modal title="新增bug" v-model="bugAdd" fullscreen :z-index="10"> <Modal title="新增bug" v-model="bugAdd" fullscreen :z-index="999">
<addBugModal ref="addBug"></addBugModal> <addBugModal ref="addBug"></addBugModal>
<div slot="footer"> <div slot="footer">
<Button @click="addCancel">取消</Button> <Button @click="addCancel">取消</Button>
<Button type="primary" @click="addSave">确定</Button> <Button type="primary" @click="addSave">确定</Button>
</div> </div>
</Modal> </Modal>
</span> </span>
</template> </template>
<script> <script>
import addBugModal from "@/pages/bug/component/add"; import addBugModal from "@/pages/bug/component/add";
export default { export default {
name: "addBug", name: "addBug",
components: { components: {
addBugModal addBugModal
},
data() {
return {
bugAdd: false,
bugCount:3
};
},
computed: {},
methods: {
async handleClickUserDropdown(name) {
if (name === "bug") {
this.$router.push({ name: "bug" });
}
}, },
openModelBugAdd() { data() {
this.bugAdd = true; return {
this.$refs.addBug.getEid(); bugAdd: false,
this.$refs.addBug.initial(); bugCount: 3
};
}, },
addCancel() { computed: {},
this.$refs.addBug.resetFields(); methods: {
this.bugAdd = false; async handleClickUserDropdown(name) {
if (name === "bug") {
this.$router.push({
name: "bug"
});
}
},
openModelBugAdd() {
this.bugAdd = true;
this.$refs.addBug.getEid();
this.$refs.addBug.initial();
},
addCancel() {
this.$refs.addBug.resetFields();
this.bugAdd = false;
},
addSave() {
let param = this.$refs.addBug.addBugInfo();
//alert(JSON.stringify(param))
if (param.id == null) {
//增加确定
this.$http.bug.createorupdate(param).then(res => {
if (res.result.status) {
this.$Message.success("新增成功!");
let newId = res.result.bugId;
this.$refs.addBug.updateEid(newId);
} else {
this.$Message.error("新增失败!");
}
this.$refs.addBug.resetFields();
this.bugAdd = false;
});
} else {
this.$Message.error("新增失败!");
}
}
}, },
addSave() { created() {},
let param = this.$refs.addBug.addBugInfo(); mounted() {}
//alert(JSON.stringify(param))
if (param.id == null) {
//增加确定
this.$http.bug.createorupdate(param).then(res => {
if (res.result.status) {
this.$Message.success("新增成功!");
let newId = res.result.bugId;
this.$refs.addBug.updateEid(newId);
} else {
this.$Message.error("新增失败!");
}
this.$refs.addBug.resetFields();
this.bugAdd = false;
});
} else {
this.$Message.error("新增失败!");
}
}
},
created() {},
mounted() {}
}; };
</script> </script>
\ No newline at end of file
...@@ -344,7 +344,7 @@ henq.dirCode = (code, v) => { ...@@ -344,7 +344,7 @@ henq.dirCode = (code, v) => {
return items return items
} }
//colums验证start
henq.makeRules = (list, apiUrl) => { henq.makeRules = (list, apiUrl) => {
//测试数据start //测试数据start
...@@ -551,4 +551,5 @@ henq.makeRules = (list, apiUrl) => { ...@@ -551,4 +551,5 @@ henq.makeRules = (list, apiUrl) => {
}) })
return rules return rules
} }
//colums验证end
export default henq; export default henq;
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem label="紧急程度" style="width:100%"> <FormItem label="紧急程度" style="width:100%" prop="urgencyLevel">
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary> <dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary>
</FormItem> </FormItem>
</Col> </Col>
...@@ -136,6 +136,12 @@ export default { ...@@ -136,6 +136,12 @@ export default {
type: "number", type: "number",
trigger: "change", trigger: "change",
}, ], }, ],
urgencyLevel: [{
required: true,
message: "请选择紧急程度",
trigger: "change",
type: "number",
}, ],
}, },
wfstatu: 1, wfstatu: 1,
......
This diff is collapsed.
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<Icon type="ios-arrow-down" /> <Icon type="ios-arrow-down" />
</p> </p>
项目信息 项目信息
<Actions/>
</Card> </Card>
<Card> <Card>
<TreeGrid :columns="columns" ref="grid" :items="list" <TreeGrid :columns="columns" ref="grid" :items="list"
...@@ -78,35 +79,47 @@ export default { ...@@ -78,35 +79,47 @@ export default {
key: "action", key: "action",
width: 150, width: 150,
align: "center", align: "center",
render: (h, params) => { // render:(h,params)=>{
return h("div", { class: "action" }, [ // return h("Actions"
h( // ,{
"op", // attrs:{
{ // row:params,
attrs: { oprate: "detail" }, // },
on: { click: () => this.view(params.row.id) }, // on:{
}, // 'on-click':()=>this.rowclick
"查看" // }
), // }
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), // )
h( // }
"op", // render: (h, params) => {
{ // return h("div", { class: "action" }, [
attrs: { oprate: "edit" }, // h(
on: { click: () => this.edit(params.row.id) }, // "op",
}, // {
"编辑" // attrs: { oprate: "detail" },
), // on: { click: () => this.view(params.row.id) },
h( // },
"op", // "查看"
{ // ),
attrs: { oprate: "delete" }, // //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
on: { click: () => this.remove(params.row.id) }, // h(
}, // "op",
"删除" // {
), // attrs: { oprate: "edit" },
]); // on: { click: () => this.edit(params.row.id) },
}, // },
// "编辑"
// ),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// ]);
// },
}, },
{ {
key: "type", key: "type",
...@@ -155,25 +168,29 @@ export default { ...@@ -155,25 +168,29 @@ export default {
}, },
mounted() { mounted() {
console.log(this); console.log(this);
this.search();
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
ok() { ok() {
// this.$refs.grid.load(); this.search();
this.modal = false; this.modal = false;
this.curId = 0; this.curId = 0;
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch); // this.$refs.grid.reload(this.easySearch);
var params={ var params={
conditions:[] conditions:[]
} }
Api.list(params).then(r=>{ Api.list(params).then(r=>{
this.list=r.result;
}) })
}, },
rowclick(row,li){
console.warn("rowclick",row,li);
},
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
...@@ -201,7 +218,7 @@ export default { ...@@ -201,7 +218,7 @@ export default {
remove(id) { remove(id) {
Api.delete(id).then((r) => { Api.delete(id).then((r) => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.search();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
} }
}); });
......
...@@ -187,14 +187,14 @@ export default { ...@@ -187,14 +187,14 @@ export default {
runtime: 0, runtime: 0,
efficiencyValue: 1, efficiencyValue: 1,
singleOut: 1, singleOut: 1,
isOutside: null, isOutside: 0,
isImportant: null, isImportant: 0,
outsideTime: 0, outsideTime: 0,
isImportantResources: null, isImportantResources: 0,
setupTime: 0, setupTime: 0,
realWorkingHours: 0, realWorkingHours: 0,
realRuntime: 0, realRuntime: 0,
isParticipateIntime: null, isParticipateIntime: 0,
equipType: "", equipType: "",
}, },
rules: { rules: {
......
...@@ -197,11 +197,11 @@ export default { ...@@ -197,11 +197,11 @@ export default {
productionRequirement: "", productionRequirement: "",
standard: "", standard: "",
qualityTemplateName: "", qualityTemplateName: "",
isImportant: null, isImportant: 0,
firstCheck: null, firstCheck: 0,
inspection: null, inspection: 0,
inspectionTime: null, inspectionTime: 0,
sampling: null, sampling: 0,
samplingBatch: "", samplingBatch: "",
}, },
tempFile: "", tempFile: "",
......
...@@ -69,6 +69,7 @@ import CustomProperties from '@/components/page/customProperties.vue' ...@@ -69,6 +69,7 @@ import CustomProperties from '@/components/page/customProperties.vue'
import InputCode from '@/components/page/inputCode.vue' import InputCode from '@/components/page/inputCode.vue'
import Pictrue from '@/components/page/pictrue.vue' import Pictrue from '@/components/page/pictrue.vue'
import WordTree from '@/components/page/wordTree.vue' import WordTree from '@/components/page/wordTree.vue'
import Actions from '@/components/page/actions.vue'
...@@ -144,6 +145,7 @@ Vue.component("CustomProperties",CustomProperties) ...@@ -144,6 +145,7 @@ Vue.component("CustomProperties",CustomProperties)
Vue.component("InputCode",InputCode) Vue.component("InputCode",InputCode)
Vue.component("Pictrue",Pictrue) Vue.component("Pictrue",Pictrue)
Vue.component("WordTree",WordTree) Vue.component("WordTree",WordTree)
Vue.component("Actions",Actions)
......
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