Commit 88f17cf3 authored by renjintao's avatar renjintao

files

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