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

pdg的查看

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