Commit d2eb068e authored by 周远喜's avatar 周远喜

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

parents ff5044ec c9950444
......@@ -1085,6 +1085,7 @@ html [type=button] {
}
i {
font-size: 16px;
padding: 4px;
border-radius: 3px;
}
......@@ -1126,13 +1127,13 @@ html [type=button] {
width: 22px;
height: 22px;
line-height: 22px;
margin: 0px 0 0 0;
margin: 0px 5px 0 0;
border-radius: 50%;
color: #515A6E;
background: #F5F6FA;
.ivu-icon {
font-weight: bold;
font-size: 20px;
font-size: 18px;
}
}
a.disable {
......
This diff is collapsed.
......@@ -81,18 +81,17 @@ export default {
},
methods: {
handler() {
if (!this.disable) {
if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({
title: this.title,
content: "<p>" + this.msg + "</p>",
onOk: () => {
this.$emit("click", event);
}
});
} else {
this.$emit("click", event);
}
if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({
title: this.title,
content: "<p>" + this.msg + "</p>",
onOk: () => {
this.$emit("click", event);
}
});
} else {
this.$emit("click", event);
}
}
},
......
......@@ -1863,6 +1863,7 @@ export default {
plansToEndTime: '计划结束时间',
completePercentage: '完成百分比',
upTaskId: '上级任务Id',
workHour:'工时'
},
//工资记录
project_plan_record: {
......
......@@ -123,23 +123,23 @@ export default {
this.detail = () => import("../plan");
},
task() {
this.curId = this.eid;
//this.curId = this.eid;
this.title = "任务";
//this.detail = () => import("../task/index");
this.$router.push({
name: "project-task",
params: {
id: this.curId
}
});
this.detail = () => import("../task/index");
// this.$router.push({
// name: "project-task",
// params: {
// id: this.curId
// }
// });
},
group() {
this.title = "项目成员";
this.detail = () => import("../groupUser/index1");
this.detail = () => import("../groupUser/index1");
},
log() {
log() {
this.title = "项目动态";
this.detail = () => import("../record/index1");
this.detail = () => import("../record/index1");
},
l(key) {
key = "project_main" + "." + key;
......
......@@ -15,7 +15,7 @@
<state code="project.main.type" :value="entity.type" />
</Filed>
<Filed :span="24" :name="l('note') + ':'">{{ entity.note }}</Filed>
<Filed :span="24" :name="l('attachment') + ':'">
<Filed :span="24" :name="l('attachment')">
<FilesView ref="refFile" :parms="parms" />
<!-- <files
ref="refFile"
......@@ -48,7 +48,7 @@ export default {
data() {
return {
avatorPath: "",
entity: this.row,
entity: {},
parms: {
app: "material",
eid: null,
......
......@@ -123,14 +123,16 @@
>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
<!-- width="800" -->
<Modal
v-model="modal1"
title="查看附件"
width="800"
fullscreen
footer-hide
:mask-closable="false"
>
<FilesView ref="refFile" :parms="parms" />
<FilesViewer :parms="parms"/>
<!-- <FilesView ref="refFile" :parms="parms" /> -->
</Modal>
</div>
</template>
......
......@@ -4,7 +4,7 @@
<Col :span="12">
<FormItem :label="l('workHour')" prop="workHour">
<InputNumber v-model="entity.workHour"></InputNumber>
<InputNumber v-model="entity.workHour" :min="0"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
......@@ -51,7 +51,7 @@ export default {
deleterUserId: null,
projectId: "",
planId: "",
workHour: null,
workHour: 0,
status: null,
title: "",
note: "",
......
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch">
<DataGrid :columns="columns" ref="grid" :data="recordList" :easy="false" :set="false" :height="400"><template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem>
......@@ -32,6 +32,9 @@ export default {
author: "henq",
description: "project_plan_record 10/20/2020 2:55:13 PM",
},
props: {
eid: String
},
data() {
return {
action: Api.index,
......@@ -46,78 +49,11 @@ export default {
detail: null,
curId: 0,
columns: [{
key: "id",
title: this.$t("id"),
hide: true,
align: "left",
high: true
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
high: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
high: true
},
{
key: "isDeleted",
title: this.l("isDeleted"),
align: "left",
high: true
},
{
key: "deletionTime",
title: this.l("deletionTime"),
align: "left",
high: true
},
{
key: "deleterUserId",
title: this.l("deleterUserId"),
align: "left",
high: true
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true
},
{
key: "workHour",
title: this.l("workHour"),
align: "left",
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
align: "right",
high: true,
code: 'mes.project_plan_record.Status'
width: 120,
},
{
key: "title",
......@@ -126,23 +62,21 @@ export default {
easy: true,
high: true
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{
key: "attachment",
title: this.l("attachment"),
align: "left",
high: true
},
{
key: "taskId",
title: this.l("taskId"),
align: "left",
high: true
align: "center",
high: true,
render: (h, params) => {
return h(
"a", {
on: {
click: () => this.viewFiles(params.row)
},
},
"查看附件"
);
},
},
{
title: '操作',
......@@ -181,11 +115,14 @@ export default {
])
}
},
]
],
recordList: []
}
},
mounted() {
console.log(this);
if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
},
async fetch({
store,
......@@ -194,6 +131,23 @@ export default {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
load(v) {
let params = {
conditions: [{
fieldName: "taskId",
fieldValue: v,
conditionalType: "Equal",
}],
sortBy: "creationTime",
isDesc: false,
}
Api.list(params).then(r => {
if (r.success) {
this.recordList = r.result
}
})
},
ok() {
this.$refs.grid.load()
this.modal = false
......@@ -234,6 +188,14 @@ export default {
}
})
},
viewFiles(row) {
if (row.attachment) {
this.parms.eid = row.attachment;
this.modal1 = true;
} else {
this.$Message.error("暂没上传附件");
}
},
cancel() {
this.curId = 0;
this.modal = false
......@@ -242,6 +204,13 @@ export default {
let vkey = "project_plan_record" + "." + key;
return this.$t(vkey) || key
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
}
}
</script>
......
......@@ -9,7 +9,7 @@
</a>
</div>
<Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true" :set="false">
<template slot="easySearch">
<Form ref="formInline" inline>
<FormItem>
......@@ -56,11 +56,13 @@
</FormItem>
<FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem>
<!--
<FormItem>
<Button @click="highSearch" type="text">
<Icon type="md-search" />高级
</Button>
</FormItem>
-->
</Form>
</template>
<template slot="buttons">
......@@ -198,6 +200,22 @@ export default {
align: "center",
high: true,
},
{
key: "workHour",
title: this.l("workHour"),
align: "center",
high: true,
render: (h, params) => {
return h('a', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.viewWork(params.row.id)
}
}, params.row.workHour)
}
},
{
key: "note",
title: this.l("note"),
......@@ -227,14 +245,14 @@ export default {
align: 'center',
render: (h, params) => {
return h('div', {
class: "action actionCur"
class: "action"
}, [
h('op', {
attrs: {
icon: "ios-play",
icon: "md-arrow-dropright-circle",
type: "icon",
oprate: "edit",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '',
// color: "#19be6b",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on: {
......@@ -246,7 +264,6 @@ export default {
// icon: "ios-pause",
// type: "icon",
// title: "暂停",
// //color: "#19be6b",
// //disable: params.row.status == 1 ? false : true
// },
// on: {
......@@ -255,10 +272,10 @@ export default {
// }),
h('op', {
attrs: {
icon: "md-checkbox-outline",
icon: "ios-alarm",
type: "icon",
oprate: "edit",
title: "完成",
//color: "#19be6b",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
},
on: {
......@@ -269,8 +286,8 @@ export default {
attrs: {
icon: "md-add",
type: "icon",
oprate: "add",
title: "新增记录",
//color: "#19be6b",
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true
},
on: {
......@@ -279,10 +296,10 @@ export default {
}),
h('op', {
attrs: {
icon: "ios-create-outline",
icon: "md-create",
type: "icon",
oprate: "edit",
title: "修改",
// color: "#2b85e4",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on: {
......@@ -291,11 +308,10 @@ export default {
}),
h('op', {
attrs: {
icon: "ios-trash-outline",
icon: "md-trash",
type: "icon",
title: "删除",
oprate: 'delete',
//color: "#ed4014",
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true
},
on: {
......@@ -315,6 +331,9 @@ export default {
planIdsCur: []
}
},
props: {
eid: String
},
async fetch({
store,
params
......@@ -322,15 +341,18 @@ export default {
await store.dispatch('loadDictionary') // 加载数据字典
},
created() {
if (this.$route.params.id != '') {
this.projectId = this.$route.params.id
this.easySearch.projectId.value = this.$route.params.id
if (this.eid != '') {
this.projectId = this.eid
this.easySearch.projectId.value = this.eid
}
this.treeHeight = window.innerHeight - 150;
},
mounted() {
this.$refs.grid.reload(this.easySearch);
console.log(this.easySearch);
if (this.eid != "") {
this.easySearch.projectId.value = this.eid
this.$refs.grid.reload(this.easySearch);
}
},
methods: {
ok() {
......@@ -407,18 +429,17 @@ export default {
},
projectId: {
op: "Equal",
value: this.$route.params.id
value: this.eid
},
};
this.$refs.grid.reload(where);
},
updatestatus(valId, valStatus) {
updatepart(valId, valStatus) {
let params = {
id: valId,
status: valStatus,
detail: ''
status: valStatus
}
Api.updatestatus(params).then(r => {
Api.updatepart(params).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('操作成功')
......@@ -441,10 +462,17 @@ export default {
this.detail = () => import('./detail')
this.modal = true;
},
viewWork(id) {
this.curId = id;
this.title = "查看工时";
this.fullScreen = false;
this.detail = () => import('../record')
this.modal = true;
},
addRecord(id) {
this.curId = id;
this.title = "新增记录";
this.fullScreen = true;
this.fullScreen = false;
this.detail = () => import('../record/add')
this.modal = true;
},
......@@ -452,6 +480,13 @@ export default {
let vkey = "project_task" + "." + key;
return this.$t(vkey) || key
}
},
watch: {
eid(v) {
if (v != "") {
this.eid = v
}
}
}
}
</script>
......
......@@ -77,6 +77,7 @@ import Pictrue from '@/components/page/pictrue.vue'
import WordTree from '@/components/page/wordTree.vue'
import Actions from '@/components/page/actions.vue'
import TimeDifference from '@/components/page/timeDifference.vue'
import FilesViewer from '@/components/page/filesViewer.vue'
......@@ -159,7 +160,7 @@ Vue.component("WordTree", WordTree)
Vue.component("Actions", Actions)
Vue.component("TimeDifference", TimeDifference)
Vue.component("Life", Life)
Vue.component("FilesViewer",FilesViewer)
//注入mock
......
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