feat:禅道280日志中保存工艺图片

This commit is contained in:
shijing 2026-01-12 11:07:23 +08:00
parent f7fc184630
commit d686d54eb8
1 changed files with 30 additions and 14 deletions

View File

@ -48,6 +48,7 @@
clearable
filterable
style="width: 100%"
@change="routeChange"
>
<el-option
v-for="item in routeOptions"
@ -80,17 +81,6 @@
</el-select>
</el-form-item>
</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-form-item :label="item.name">
<el-input-number
@ -191,13 +181,20 @@
></el-input>
</el-form-item>
</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-form>
</el-main>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click="submit"
>保存</el-button
>
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-container>
@ -260,6 +257,7 @@ export default {
edit: "编辑日志",
show: "查看日志",
},
imageUrl:'',
test_file:'',
fileList:[],
//
@ -387,6 +385,18 @@ export default {
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) {
let that = this;
@ -424,6 +434,9 @@ export default {
});
},500)
}
if(that.route_code=='paiyicibang'&&data.oinfo_json.imageUrl){
this.imageUrl = data.oinfo_json.imageUrl;
}
}
this.getRoute(data.id);
},
@ -450,6 +463,9 @@ export default {
that.testitems.forEach((item) => {
oinfo_json[item.id] = item.value;
})
if(that.mgroupName=='排一次棒'&&that.imageUrl!==''){
oinfo_json.imageUrl = that.imageUrl;
}
that.form.oinfo_json = oinfo_json;
if (that.mode === "add") {
that.$API.wpm.mlog.init.req(that.form).then((res) => {