Commit 867cecb8 authored by “lixuyan”'s avatar “lixuyan”

pdg的查看

parent 1620a57b
......@@ -52,6 +52,12 @@ export default {
},
mounted() {
this.$bus.$on('completeEvent', (res) => {
this.$message({
message: '保存成功',
type: 'success'
})
})
},
// 组件方法
methods: {
......
......@@ -4,7 +4,7 @@
<el-form
ref="form2"
class="GlueBlendingCard-footer-form"
:model="form2"
:model="form"
label-width="130px"
:rules="rules2"
>
......@@ -12,7 +12,7 @@
<el-col :span="6">
<el-form-item label="剩余施工期/mim" prop="leftWorkMinutes">
<el-input
v-model="form2.leftWorkMinutes"
v-model="form.leftWorkMinutes"
class="input-with-select el-input--small"
placeholder="请输入剩余施工期"
clearable
......@@ -24,7 +24,7 @@
<el-col :span="6">
<el-form-item label="失效期" prop="validityEnd">
<el-date-picker
v-model="form2.validityEnd"
v-model="form.validityEnd"
type="datetime"
class="input-with-select el-input--small"
placeholder="请选择失效期"
......@@ -38,18 +38,18 @@
<el-col :span="6">
<el-form-item label="" prop="isFreezing">
<el-radio-group
v-model="form2.isFreezing"
v-model="form.isFreezing"
:disabled="disabled"
>
<el-radio label="true">需要</el-radio>
<el-radio label="false">不需要</el-radio>
<el-radio :label="true">需要</el-radio>
<el-radio :label="false">不需要</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col v-if="form2.isFreezing === 'true'" :span="6">
<el-form-item label="冷冻温度/℃" prop="freezTemperature">
<el-col v-if="form.isFreezing === true" :span="6">
<el-form-item label="冷冻温度/℃" prop="freeTemperature">
<el-input
v-model="form2.freezTemperature"
v-model="form.freeTemperature"
placeholder="请输入冷冻温度/℃"
clearable
class="input-with-select el-input--small"
......@@ -67,7 +67,6 @@
:columns="colums2"
:data="tableData2"
:options="tableOptions2"
@row-click="rowClick2"
>
<dee-tools slot="header" :tools="tools" mode="normal" />
</dee-table>
......@@ -94,6 +93,10 @@ export default {
basicData: {
type: Object,
default: () => null
},
form: {
type: Object,
default: () => null
}
},
data() {
......@@ -144,10 +147,9 @@ export default {
type: 'error'
})
.then(() => {
this.HttpRequest(
'/AssignCardItem/deleteItem',
params,
'post'
post(
'/AssignCardItem/recursion',
params
)
.then((res) => {
this.reset('删除')
......@@ -189,18 +191,18 @@ export default {
isFreezing: [
{ required: true, message: '请选择是否需要冷冻', trigger: 'blur' }
],
freezTemperature: [
freeTemperature: [
{ required: true, message: '请输入冷冻温度', trigger: 'blur' }
]
},
form2: {
isFreezing: '', // 是否需要冷冻
freezTemperature: '', // 冷冻温度
leftWorkMinutes: '', // 剩余施工期
validityEnd: '' // 失效期
},
// form2: {
// isFreezing: '', // 是否需要冷冻
// freezTemperature: '', // 冷冻温度
// leftWorkMinutes: '', // 剩余施工期
// validityEnd: '' // 失效期
// },
// 冷冻表格数据
// tableData2: [],
tableData2: [],
// 序号
indexRow: { title: '序号', align: 'center', width: '70' },
// 表格样式配置
......@@ -223,34 +225,38 @@ export default {
}
},
methods: {
rowClick2(row) {
this.row2 = row.id
},
reload() {
this.getLasousInstallation()
},
getLasousInstallation() {
const params = {
pageFrom: 1,
pageSize: 99999,
indices: ['AssignCardItem'],
searchItems: {
items: [
{
fieldName: 'subTypeName',
operator: 'EQ',
value: 'AssignCardItem'
},
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [
{
fieldName: 'assignCardId',
operator: 'EQ',
value: this.row.pboId // 记录卡id
'items': [
{
'fieldName': 'assignCardId',
'operator': 'EQ',
'value': this.basicData.id
}
],
'operator': 'AND'
}
],
operator: 'AND'
}
'items': [],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/AssignCardItem/find/recursion', params)
post('/AssignCardItem/search', params)
.then((res) => {
this.tableData2 = res.items.content
})
......@@ -264,13 +270,6 @@ export default {
message: `${message}成功`,
type: 'success'
})
if (message !== '保存') {
this.tableData = []
this.tableData2 = []
this.$refs.form.resetFields()
this.$refs.form2.resetFields()
this.$emit('reload')
}
}
}
}
......
......@@ -42,7 +42,7 @@
<script>
// import { downloadPdfHandle } from '@/api/inventory.js'
// import axios from 'axios'
import axios from 'axios'
export default {
components: {},
......@@ -132,36 +132,39 @@ export default {
type: 'error'
})
}
// const baseURl = downloadPdfHandle()
// axios({
// method: 'get',
// url: '/gace/mbom/downloadGACEAppData',
// params: {
// gaceUrl: row.docsUrl + localStorage.getItem('fullName'),
// docName: row.docName
// },
// baseURL: baseURl,
// headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
// responseType: 'arraybuffer'
// }).then((res) => {
// const blob = new Blob([res.data], {
// type: 'application/pdf'
// })
// if (window.navigator.msSaveOrOpenBlob) {
// navigator.msSaveBlob(blob)
// } else {
// // const elink = document.createElement('a')
// // elink.download = 'pdf.pdf'
// // elink.style.display = 'none'
// // elink.href = URL.createObjectURL(blob)
// var openUrl = URL.createObjectURL(blob)
// window.open(openUrl)
// // obj.document.title = '驱蚊器为切为'
// // document.body.appendChild(elink)
// // elink.click()
// // document.body.removeChild(elink)
// }
// })
// eslint-disable-next-line no-undef
const baseURl = `${VUE_APP_BASE_API || process.env.VUE_APP_BASE_API}`
const user = 27200113
console.log(row.docsUrl + user)
axios({
method: 'get',
url: '/gace/mbom/downloadGACEAppData',
params: {
gaceUrl: row.docsUrl + user,
docName: row.docName
},
baseURL: baseURl,
headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
responseType: 'arraybuffer'
}).then((res) => {
const blob = new Blob([res.data], {
type: 'application/pdf'
})
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob)
} else {
// const elink = document.createElement('a')
// elink.download = 'pdf.pdf'
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
var openUrl = URL.createObjectURL(blob)
window.open(openUrl)
// obj.document.title = '驱蚊器为切为'
// document.body.appendChild(elink)
// elink.click()
// document.body.removeChild(elink)
}
})
}
}
}
......
......@@ -58,20 +58,15 @@ export default {
this.visible = true
this.$nextTick(() => {
this.getTablesData(1)
this.getTablesData(2)
// this.getTablesData(2)
this.getDocTable()
this.getFrockTable()
})
},
handleClose() {},
getTablesData(value) {
var that = this
if (value === 1) {
this.$refs.table1.loading = true
} else {
this.$refs.table2.loading = true
}
this.$refs.table1.loading = true
this.$refs.table2.loading = true
const params = {
'searchItems': {
'children': [
......@@ -85,8 +80,8 @@ export default {
},
{
'fieldName': 'subTypeName',
'operator': value === 1 ? 'EQ' : 'IN',
'value': value === 1 ? 'DxProcessPlanDesignView' : ['DocInnerRef', 'DocOuterRef']
'operator': 'EQ',
'value': 'DxProcessPlanDesignView'
}
],
'operator': 'AND'
......@@ -112,17 +107,9 @@ export default {
params)
.then((res) => {
if (res.message.includes('成功')) {
if (value === 1) {
this.tableDesign = res.items.content || []
} else {
this.tableFile = res.items.content || []
}
this.tableDesign = res.items.content || []
this.$nextTick(() => {
if (value === 1) {
this.$refs.table1.init()
} else {
this.$refs.table2.init()
}
this.$refs.table1.init()
})
} else {
that.$message({
......@@ -134,12 +121,67 @@ export default {
})
.catch((err) => console.error(err))
.finally(() => {
if (value === 1) {
this.$refs.table1.loading = false
this.$refs.table1.loading = false
})
},
getDocTable() {
var that = this
this.$refs.table2.loading = true
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extProcessDocLinks.sourceId',
'operator': 'EQ',
'value': this.$parent.headerData.aoId
},
{
'fieldName': 'subTypeName',
'operator': 'IN',
'value': ['DocInnerRef', 'DocOuterRef']
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extProcessDocLinks'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
post(`/ExtProcessDocument/getProcessDocument`,
params)
.then((res) => {
if (res.message.includes('成功')) {
this.tableFile = res.items.content || []
this.$nextTick(() => {
this.$refs.table2.init()
})
} else {
this.$refs.table2.loading = false
that.$message({
showClose: true,
message: '保存失败',
type: 'error'
})
}
})
.catch((err) => console.error(err))
.finally(() => {
this.$refs.table2.loading = false
})
},
getFrockTable() {
var that = this
......
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