feat:禅道280日志中保存工艺图片
This commit is contained in:
parent
f7fc184630
commit
d686d54eb8
|
|
@ -48,6 +48,7 @@
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="routeChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in routeOptions"
|
v-for="item in routeOptions"
|
||||||
|
|
@ -80,17 +81,6 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="route_code=='tuomoceliang'">
|
|
||||||
<el-form-item label="切分数量">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.cutCount"
|
|
||||||
:min="1"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
||||||
<el-form-item :label="item.name">
|
<el-form-item :label="item.name">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -191,13 +181,20 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='paiyicibang'&&imageUrl!==''">
|
||||||
|
<el-form-item label="工艺图纸">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="imageUrl"
|
||||||
|
fit="fill"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||||
>保存</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -260,6 +257,7 @@ export default {
|
||||||
edit: "编辑日志",
|
edit: "编辑日志",
|
||||||
show: "查看日志",
|
show: "查看日志",
|
||||||
},
|
},
|
||||||
|
imageUrl:'',
|
||||||
test_file:'',
|
test_file:'',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
//表单数据
|
//表单数据
|
||||||
|
|
@ -387,6 +385,18 @@ export default {
|
||||||
that.routeOptions = res;
|
that.routeOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
routeChange(){
|
||||||
|
let that = this;
|
||||||
|
if(that.route_code=='paiyicibang'){
|
||||||
|
that.$API.mtm.route.item.req(that.form.route).then((res) => {
|
||||||
|
let json = res.params_json;
|
||||||
|
if(json.fileurl){
|
||||||
|
let fileurl = JSON.parse(json.fileurl);
|
||||||
|
that.imageUrl = fileurl[0].path;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add",type) {
|
open(mode = "add",type) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -424,6 +434,9 @@ export default {
|
||||||
});
|
});
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
|
if(that.route_code=='paiyicibang'&&data.oinfo_json.imageUrl){
|
||||||
|
this.imageUrl = data.oinfo_json.imageUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.getRoute(data.id);
|
this.getRoute(data.id);
|
||||||
},
|
},
|
||||||
|
|
@ -450,6 +463,9 @@ export default {
|
||||||
that.testitems.forEach((item) => {
|
that.testitems.forEach((item) => {
|
||||||
oinfo_json[item.id] = item.value;
|
oinfo_json[item.id] = item.value;
|
||||||
})
|
})
|
||||||
|
if(that.mgroupName=='排一次棒'&&that.imageUrl!==''){
|
||||||
|
oinfo_json.imageUrl = that.imageUrl;
|
||||||
|
}
|
||||||
that.form.oinfo_json = oinfo_json;
|
that.form.oinfo_json = oinfo_json;
|
||||||
if (that.mode === "add") {
|
if (that.mode === "add") {
|
||||||
that.$API.wpm.mlog.init.req(that.form).then((res) => {
|
that.$API.wpm.mlog.init.req(that.form).then((res) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue