Commit 88f17cf3 authored by renjintao's avatar renjintao

files

parents 02c7ed03 78b8eba8
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
line-height: 40px; line-height: 40px;
>.label { > .label {
background: #f7f7f7; background: #f7f7f7;
flex-grow: 0; flex-grow: 0;
width: 120px; width: 120px;
...@@ -49,25 +49,27 @@ export default { ...@@ -49,25 +49,27 @@ export default {
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
flex-shrink: 0; flex-shrink: 0;
} }
>.value { > .value {
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
flex-grow: 1; flex-grow: 1;
padding-left: 10px; padding-left: 10px;
>div{ > div {
line-height: 30px; line-height: 30px;
} }
} }
} }
} }
} }
.new_detail { .new-detail {
.ivu-row { .ivu-row {
width: 100% !important; width: 100% !important;
.filed-col { .filed-col {
box-sizing: border-box; box-sizing: border-box;
line-height: 70px; line-height: 70px;
>.label { display: flex;
flex-direction: row;
> .label {
display: inline-block; display: inline-block;
width: 100px; width: 100px;
text-align: right; text-align: right;
...@@ -75,7 +77,7 @@ export default { ...@@ -75,7 +77,7 @@ export default {
height: 100%; height: 100%;
font-weight: bold; font-weight: bold;
} }
>p { > .value {
text-align: left; text-align: left;
height: 100%; height: 100%;
word-break: break-all; word-break: break-all;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</div> </div>
</template> </template>
<script> <script>
import util from '@/libs/util';
export default { export default {
name: "files", name: "files",
model: { model: {
...@@ -185,7 +186,7 @@ export default { ...@@ -185,7 +186,7 @@ export default {
this.postUrl = this.postUrl =
fileUrl + fileUrl +
"/upload/?token=Bearer " + "/upload/?token=Bearer " +
window.sessionStorage.getItem("token") + util.cookies.get('token') +
"&" + "&" +
this.convertObj(this.parms); this.convertObj(this.parms);
//是否显示上传按钮 //是否显示上传按钮
......
<template> <template>
<div> <div>
<Input v-model="newName" style="height:28px;width:400px;float:left;margin-top:2px;"> <Input v-model="newName" placeholder="请选择上传文件">
<Button slot="prepend" icon="ios-eye" title="查看" @click="downFile(newName)"></Button> <Button v-if="view" icon="ios-eye" slot="prepend"> </Button>
<Button type="primary" icon="ios-cloud-upload-outline" slot="append" @click="handler">上传</Button>
</Input> </Input>
<Upload <Upload
v-model="name" v-model="name"
...@@ -17,12 +18,13 @@ ...@@ -17,12 +18,13 @@
:files="files" :files="files"
:on-progress="onProgress" :on-progress="onProgress"
> >
<Button icon="ios-cloud-upload-outline">上传文件</Button> <Button v-show="1==2" type="primary" ref="upload">上传</Button>
</Upload> </Upload>
<Progress :percent="per" :stroke-width="5" v-show="vshowPro" /> <Progress :percent="per" :stroke-width="5" v-show="vshowPro" />
</div> </div>
</template> </template>
<script> <script>
import util from "@/libs/util";
export default { export default {
name: "inputFile", name: "inputFile",
model: { model: {
...@@ -39,7 +41,7 @@ export default { ...@@ -39,7 +41,7 @@ export default {
postUrl: postUrl:
fileUrl + fileUrl +
"/upload/?token=Bearer " + "/upload/?token=Bearer " +
window.sessionStorage.getItem("token") + util.cookies.get("token") +
"&" + "&" +
this.parms, this.parms,
formatList: ["png", "jpg", "gif"], formatList: ["png", "jpg", "gif"],
...@@ -74,6 +76,9 @@ export default { ...@@ -74,6 +76,9 @@ export default {
this.per = 0; this.per = 0;
this.vshowPro = true; this.vshowPro = true;
}, },
handler() {
this.$refs.upload.$el.click();
},
// change(event) { // change(event) {
// this.$emit('on-change', event.target.value) // this.$emit('on-change', event.target.value)
// }, // },
...@@ -159,6 +164,9 @@ export default { ...@@ -159,6 +164,9 @@ export default {
computed: { computed: {
nativeInputValue() { nativeInputValue() {
return this.value === null || this.value === undefined ? "" : this.value; return this.value === null || this.value === undefined ? "" : this.value;
},
view(){
return true
} }
}, },
watch: { watch: {
......
...@@ -269,9 +269,9 @@ let options = { ...@@ -269,9 +269,9 @@ let options = {
}, },
{ {
id: 2, id: 2,
label: "任务", label: "名称",
value: "label", value: "name",
width: 200, width: 100,
expander: true, expander: true,
html: true html: true
// events: { // events: {
...@@ -283,38 +283,43 @@ let options = { ...@@ -283,38 +283,43 @@ let options = {
{ {
id: 3, id: 3,
label: "设备编号", label: "设备编号",
value: "user", value: "EquipmentNo",
width: 160,
width: 130,
html: true html: true
}, },
{ {
id: 4, id: 4,
label: "开始时间", label: "计划开始时间",
value: task => dayjs(task.start).format("YYYY-MM-DD"), value: task => dayjs(task.start).format("YYYY-MM-DD"),
width: 78 width: 100
}, },
{ {
id: 5, id: 5,
label: "结束时间", label: "计划结束时间",
value: task => dayjs(task.endTime).format("YYYY-MM-DD"), value: task => dayjs(task.endTime).format("YYYY-MM-DD"),
width: 78 width: 100
}, },
{ {
id: 6, id: 6,
label: "计划数量",
value: "plan_qty",
width: 68
},
{
id: 7,
label: "投入数量", label: "投入数量",
value: "put_into_qty", value: "put_into_qty",
width: 68 width: 68
}, },
{ {
id: 7, id: 8,
label: "派工数量", label: "派工数量",
value: "dispatch_qty", value: "dispatch_qty",
width: 68 width: 68
}, },
{ {
id: 8, id: 9,
label: "%", label: "%",
value: "progress", value: "progress",
width: 35, width: 35,
...@@ -369,7 +374,7 @@ export default { ...@@ -369,7 +374,7 @@ export default {
data() { data() {
return { return {
tasks:[], tasks,
options, options,
dynamicStyle: {}, dynamicStyle: {},
lastId: 16 lastId: 16
...@@ -385,22 +390,37 @@ export default { ...@@ -385,22 +390,37 @@ export default {
Api.paged({ scheduleId: this.id }) Api.paged({ scheduleId: this.id })
.then(r => { .then(r => {
if (r.result) { if (r.result) {
var parentId = r.result[0].id; //父级id
var list = [];
var obj = {
id: r.result[0].id,
name: r.result[0].part_name,
start: r.result[0].plan_start,
endTime: r.result[0].plan_finish,
EquipmentNo: "/",
duration: 15 * 24 * 60 * 60 * 1000,
percent: 85,
plan_qty: r.result[0].plan_qty,
put_into_qty: "/",
dispatch_qty: "/"
};
list.push(obj);
Api.getdetail({ Api.getdetail({
part_task_pk: r.result[0].id, part_task_pk: r.result[0].id,
scheduleId: this.id scheduleId: this.id
}).then(r => { }).then(r => {
if (r.result) { if (r.result) {
var list = [];
for (var i = 0; i < r.result.length; i++) { for (var i = 0; i < r.result.length; i++) {
let temp = { let temp = {
id: r.result[i].op_task_pk, id: r.result[i].op_task_pk,
label: r.result[i].task_name, name: r.result[i].task_name,
user: r.result[i].equip_id, EquipmentNo: r.result[i].equip_id,
parentId: parentId,
// start: r.result[i].plan_start, // start: r.result[i].plan_start,
// endTime: r.result[i].plan_finish, // endTime: r.result[i].plan_finish,
endTime: "2020-7-30", endTime: "2020-7-30",
start: getDate(1), start: getDate(-24 * 5),
duration: (15*i) * 24 * 60 * 60 * 1000, duration: 15 * 24 * 60 * 60 * 1000,
percent: 85, percent: 85,
put_into_qty: r.result[i].put_into_qty, put_into_qty: r.result[i].put_into_qty,
dispatch_qty: r.result[i].dispatch_qty dispatch_qty: r.result[i].dispatch_qty
......
...@@ -217,6 +217,7 @@ ...@@ -217,6 +217,7 @@
margin: 20px 72px; margin: 20px 72px;
width: 300px; width: 300px;
height: 240px; height: 240px;
border-color: #2680EB;
.ivu-card-head{ .ivu-card-head{
background: #d3e6fb; background: #d3e6fb;
border-radius: 4px 4px 0px 0px; border-radius: 4px 4px 0px 0px;
...@@ -259,6 +260,7 @@ ...@@ -259,6 +260,7 @@
} }
.gs_card:hover { .gs_card:hover {
border-color: #2680EB; border-color: #2680EB;
box-shadow: 0px 6px 9px #484040b5;
} }
.gs_add{ .gs_add{
border: 1px dashed #2680EB; border: 1px dashed #2680EB;
...@@ -272,3 +274,42 @@ ...@@ -272,3 +274,42 @@
} }
} }
} }
.add_user{
.gd_userB{
border: 1px solid #ccc;
padding: 10px;
height: 440px;
overflow-x: auto;
.user_item {
max-width: 160px;
display: inline-block;
width: 160px;
height: 56px;
border-radius: 28px 4px 4px 28px;
border: 1px solid #2d8cf0;
margin: 15px 23px;
i {
font-size: 56px;
float: left;
color: #2680EB;
}
.gd_user {
padding: 6px;
}
.user_bg {
// border: 3px solid #ceb0b0;
border-radius: 25px 4px 4px 25px;
height: 54px;
background: #2680eb;
color: #fff;
i {
font-size: 56px;
color: #ffffff;
}
.gd_user {
padding: 6px;
}
}
}
}
}
\ No newline at end of file
<template> <template>
<div> <div class="add_user">
<Form ref="form" :model="entity" :rules="rules" :label-width="100"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<Col span="12"> <Col span="8">
<FormItem label="所属车间"> <FormItem label="所属车间">
<Input v-model="entity.projectNo" disabled></Input> <Select v-model="entity.che" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="8">
<FormItem label="所属班组"> <FormItem label="所属班组">
<Input v-model="entity.productName" disabled></Input> <Select v-model="entity.productName" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="8">
<FormItem label="数字"> <FormItem label="">
<InputNumber v-model="entity.outSideTime" style="width:150px;" :min="0"></InputNumber> <Input search enter-button placeholder="请输入编号" />
</FormItem>
</Col>
<Col span="24" class="mb20">
<div class="gd_userB">
<a class="user_item" @click="checkItem(index)" v-for="(item,index) in listMan" :key="index">
<div :class="{user_bg:item.checked}" >
<Icon type="md-contact" />
<div class="gd_user">
<span class="user_name">{{item.userName}}</span>
<span class="user_number">{{item.userCode}}</span>
</div>
</div>
</a>
</div>
</Col>
<Col span="24">
<FormItem label="分配工时">
<InputNumber :max="30" :min="0" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp;
<InputNumber :max="23" :min="0" v-model="value1"></InputNumber> 小时 &nbsp;&nbsp;&nbsp;&nbsp;
<InputNumber :max="59" :min="1" v-model="value1"></InputNumber> 分钟 &nbsp;&nbsp;&nbsp;&nbsp;
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -33,13 +59,51 @@ export default { ...@@ -33,13 +59,51 @@ export default {
data(){ data(){
return{ return{
admor:1, admor:1,
value1:1,
u_bgFlag:false,
entity: { entity: {
}, },
rules: { rules: {
outSideTime: [ outSideTime: [
{ required: true, message: "必填", type: "number", trigger: "change" } { required: true, message: "必填", type: "number", trigger: "change" }
] ]
},
cityList:[
{
value: '车间A1',
label: '车间A1'
},{
value: '车间A2',
label: '车间A2'
},{
value: '车间A3',
label: '车间A3'
},{
value: '车间A4',
label: '车间A4'
},{
value: '车间A5',
label: '车间A5'
},
],
listMan:[
{
checked:false,
userName:'张珊珊1',
userCode:'08965481',
id: 1
},{
checked:false,
userName:'张珊珊2',
userCode:'08965482',
id: 2
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
} }
],
} }
}, },
methods: { methods: {
...@@ -49,6 +113,9 @@ export default { ...@@ -49,6 +113,9 @@ export default {
handleClose(){ handleClose(){
this.$emit("on-close"); this.$emit("on-close");
}, },
checkItem(i){
this.listMan[i].checked = !this.listMan[i].checked;
},
}, },
} }
</script> </script>
\ No newline at end of file
...@@ -68,7 +68,9 @@ export default { ...@@ -68,7 +68,9 @@ export default {
easySearch: { easySearch: {
keys: { op: "title,code,type,departTitle", value: null } keys: { op: "title,code,type,departTitle", value: null }
}, },
entity: {}, entity: {
isimportant: "1"
},
disabled: false, disabled: false,
ids: [], ids: [],
editModal: false, editModal: false,
...@@ -285,6 +287,8 @@ export default { ...@@ -285,6 +287,8 @@ export default {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
console.warn(err); console.warn(err);
}); });
} else {
this.$Message.error("请输入必填项");
} }
}); });
}, },
......
...@@ -111,7 +111,8 @@ ...@@ -111,7 +111,8 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName"> <FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<inputFile v-model="tempFile" :parms="parms" /> <!-- <files ref="refFile" :parms="parms" files singleFile /> -->
<InputFile v-model="entity.qualityTemplateName"/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
......
...@@ -32,7 +32,7 @@ import clipboard from 'clipboard'; ...@@ -32,7 +32,7 @@ import clipboard from 'clipboard';
import radioButton from '@/components/page/radioButton.vue' import radioButton from '@/components/page/radioButton.vue'
import InputIcon from '@/components/page/inputIcon.vue' import InputIcon from '@/components/page/inputIcon.vue'
import checkBoxButton from '@/components/page/checkBoxButton.vue' import checkBoxButton from '@/components/page/checkBoxButton.vue'
import inputFile from '@/components/page/inputFile.vue' import InputFile from '@/components/page/inputFile.vue'
import imgUploadFile from '@/components/page/imgUploadFile.vue' import imgUploadFile from '@/components/page/imgUploadFile.vue'
import files from '@/components/page/files.vue' import files from '@/components/page/files.vue'
import FilesList from '@/components/page/filesList.vue' import FilesList from '@/components/page/filesList.vue'
...@@ -74,7 +74,7 @@ Vue.component("State", State) ...@@ -74,7 +74,7 @@ Vue.component("State", State)
Vue.component("Dictionary", Dictionary) Vue.component("Dictionary", Dictionary)
Vue.component("radioButton", radioButton) Vue.component("radioButton", radioButton)
Vue.component("checkBoxButton", checkBoxButton) Vue.component("checkBoxButton", checkBoxButton)
Vue.component("inputFile", inputFile) Vue.component("InputFile", InputFile)
Vue.component("imgUploadFile", imgUploadFile) Vue.component("imgUploadFile", imgUploadFile)
Vue.component("InputIcon", InputIcon) Vue.component("InputIcon", InputIcon)
Vue.component("files", files) Vue.component("files", files)
......
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