Commit 47cf50cc authored by “lixuyan”'s avatar “lixuyan”

架次修改

parent e2a67d7f
...@@ -305,23 +305,33 @@ export default { ...@@ -305,23 +305,33 @@ export default {
resize: true resize: true
}, },
{ {
name: 'start_date', name: 'scheduledStart',
label: '计划开工时间', label: '计划开工时间',
align: 'center', align: 'center',
width: 120, width: 120,
resize: true, resize: true,
template: function(obj) { template: function(obj) {
return that.formatDate(obj.start_date) return that.formatDate(obj.scheduledStart)
} }
}, },
// {
// name: 'start_date',
// label: '计划开工时间',
// align: 'center',
// width: 120,
// resize: true,
// template: function(obj) {
// return that.formatDate(obj.start_date)
// }
// },
{ {
name: 'end_date', name: 'scheduledEnd',
label: '计划完工时间', label: '计划完工时间',
align: 'center', align: 'center',
width: 120, width: 120,
resize: true, resize: true,
template: function(obj) { template: function(obj) {
return that.formatDate(obj.end_date) return that.formatDate(obj.scheduledEnd)
} }
}, },
{ {
...@@ -367,10 +377,10 @@ export default { ...@@ -367,10 +377,10 @@ export default {
}, },
// 获取甘特图数据 // 获取甘特图数据
getAllData(val) { getAllData(val) {
const sortiesId = val.sorties.split(':')[0] const sortiesId = val.sorties
const sortiesTypeId = val.sorties.split(':').slice(-1)[0] // const sortiesTypeId = val.sorties.split(':').slice(-1)[0]
const params = { const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }, { 'fieldName': 'soritesTypeId', 'operator': 'EQ', 'value': sortiesTypeId }] }, 'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }] },
'openProps': [ 'openProps': [
{ {
'name': 'extProcessExecutorRoutes' 'name': 'extProcessExecutorRoutes'
...@@ -449,7 +459,7 @@ export default { ...@@ -449,7 +459,7 @@ export default {
} }
}, },
addAO(m, p, params) { addAO(m, p, params) {
if (p.target) { if (p.target && p.target.wrProduction) {
params.data.push(this.toAO(m, p.target)) params.data.push(this.toAO(m, p.target))
} }
}, },
...@@ -463,6 +473,8 @@ export default { ...@@ -463,6 +473,8 @@ export default {
type: 'project', type: 'project',
id: p.id, id: p.id,
start_date: p.extPositionPlans[0].scheduledStart, start_date: p.extPositionPlans[0].scheduledStart,
scheduledStart: p.extPositionPlans[0].scheduledStart,
scheduledEnd: p.extPositionPlans[0].scheduledEnd,
text: p.serialNumber, text: p.serialNumber,
right_text: p.name, right_text: p.name,
isLeaf: true, isLeaf: true,
...@@ -489,6 +501,8 @@ export default { ...@@ -489,6 +501,8 @@ export default {
return { return {
id: p.id, id: p.id,
start_date: p.wrProduction[0].scheduledStart, start_date: p.wrProduction[0].scheduledStart,
scheduledStart: p.wrProduction[0].scheduledStart,
scheduledEnd: p.wrProduction[0].scheduledEnd,
status: p.wrProduction[0].planState, status: p.wrProduction[0].planState,
text: p.serialNumber, text: p.serialNumber,
parent: m.id, parent: m.id,
......
...@@ -220,16 +220,22 @@ export default { ...@@ -220,16 +220,22 @@ export default {
this.sortiesData = [] this.sortiesData = []
this.sorties = null this.sorties = null
} }
const params = { 'searchItems': { 'items': [{ 'fieldName': 'id', 'operator': 'NEQ', 'value': 0 }] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] } const params = { 'searchItems': { 'items': [{ 'fieldName': 'aircraftTypeId', 'operator': 'EQ', 'value': this.form.model }] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
params.openProps = [{ name: 'target' }, { name: 'source' }] params.openProps = [{ name: 'aircraftType' }]
this.$api.searchApi('SoritesLink', params) this.$api.searchApi('AircraftSorties', params)
.then((res) => { .then((res) => {
this.sortiesData = [] this.sortiesData = []
if (res) { if (res) {
// this.sortiesData = res.items.content.map(row => {
// return {
// value: `${row.sourceId}:${row.targetId}`,
// label: this.getSoritesLabel(row)
// }
// })
this.sortiesData = res.items.content.map(row => { this.sortiesData = res.items.content.map(row => {
return { return {
value: `${row.sourceId}:${row.targetId}`, value: row.id,
label: this.getSoritesLabel(row) label: row.defName
} }
}) })
this.$nextTick(() => { this.$nextTick(() => {
...@@ -289,8 +295,8 @@ export default { ...@@ -289,8 +295,8 @@ export default {
* 获取项目计划 * 获取项目计划
*/ */
getProjectPlan() { getProjectPlan() {
const sortiesId = this.form.sorties.split(':')[0] const sortiesId = this.form.sorties
const sortiesTypeId = this.form.sorties.split(':').slice(-1)[0] // const sortiesTypeId = this.form.sorties.split(':').slice(-1)[0]
const param = { const param = {
pageFrom: 1, pageFrom: 1,
pageSize: 50, pageSize: 50,
...@@ -298,11 +304,11 @@ export default { ...@@ -298,11 +304,11 @@ export default {
children: [ children: [
{ {
items: [ items: [
{ // {
fieldName: 'soritesTypeId', // fieldName: 'soritesTypeId',
operator: 'EQ', // operator: 'EQ',
value: sortiesTypeId // value: sortiesTypeId
}, // },
{ {
fieldName: 'aircraftSortiesId', fieldName: 'aircraftSortiesId',
operator: 'EQ', operator: 'EQ',
...@@ -372,10 +378,10 @@ export default { ...@@ -372,10 +378,10 @@ export default {
* 获取站位 * 获取站位
*/ */
getStation() { getStation() {
const sortiesId = this.form.sorties.split(':')[0] const sortiesId = this.form.sorties
const sortiesTypeId = this.form.sorties.split(':').slice(-1)[0] // const sortiesTypeId = this.form.sorties.split(':').slice(-1)[0]
const params = { const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }, { 'fieldName': 'soritesTypeId', 'operator': 'EQ', 'value': sortiesTypeId }] }, 'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }] },
'openProps': [{ name: 'extPositionPlans' }], 'openProps': [{ name: 'extPositionPlans' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }] 'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
} }
......
...@@ -385,6 +385,8 @@ export default { ...@@ -385,6 +385,8 @@ export default {
if (res.items) { if (res.items) {
this.refrehGantt(res.items) this.refrehGantt(res.items)
} }
}).catch((err) => {
console.log(err)
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
}) })
......
...@@ -135,15 +135,22 @@ export default { ...@@ -135,15 +135,22 @@ export default {
methods: { methods: {
getSortiesList() { getSortiesList() {
this.sortiesData = [] this.sortiesData = []
const params = { 'searchItems': { 'items': [{ 'fieldName': 'id', 'operator': 'NEQ', 'value': 0 }] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] } const params = { 'searchItems': { 'items': [{ 'fieldName': 'aircraftTypeId', 'operator': 'EQ', 'value': this.form.model }] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
params.openProps = [{ name: 'target' }, { name: 'source' }] params.openProps = [{ name: 'aircraftType' }]
this.$api.searchApi('SoritesLink', params).then(res => { this.$api.searchApi('AircraftSorties', params).then(res => {
if (res.items && res.items.content) { if (res.items && res.items.content) {
// this.sortiesData = res.items.content.map(row => {
// return {
// value: `${row.sourceId}:${row.targetId}`,
// label: this.getSoritesLabel(row),
// defName: row.source.defName
// }
// })
this.sortiesData = res.items.content.map(row => { this.sortiesData = res.items.content.map(row => {
return { return {
value: `${row.sourceId}:${row.targetId}`, value: row.id,
label: this.getSoritesLabel(row), label: row.defName,
defName: row.source.defName defName: row.defName
} }
}) })
this.$set(this.form, 'sorties', this.sortiesData[0].value) this.$set(this.form, 'sorties', this.sortiesData[0].value)
......
...@@ -100,10 +100,9 @@ export default { ...@@ -100,10 +100,9 @@ export default {
methods: { methods: {
getStation() { getStation() {
const sortiesId = this.sortiesId.split(':')[0] const sortiesId = this.sortiesId
const sortiesTypeId = this.sortiesId.split(':').slice(-1)[0]
const params = { const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }, { 'fieldName': 'soritesTypeId', 'operator': 'EQ', 'value': sortiesTypeId }] }, 'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': sortiesId }] },
'openProps': [{ name: 'aircraftSorties' }], 'openProps': [{ name: 'aircraftSorties' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }] 'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
} }
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</dd> </dd>
</el-popover> </el-popover>
<dd @click="$parent.isShow = false"> <dd @click="$parent.isShow = false">
<i class="icon iconfont el-icon-collection" /> <i class="icon el-icon-collection" />
<p>视图切换</p> <p>视图切换</p>
</dd> </dd>
<dd @click="$refs.TimeToSee.open()"> <dd @click="$refs.TimeToSee.open()">
...@@ -401,7 +401,7 @@ export default { ...@@ -401,7 +401,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
// @import "../../../../../../icons/app/iconfont.css"; @import "../../../../icons/app/iconfont.css";
@keyframes glow { @keyframes glow {
0% { 0% {
box-shadow: 2px 3px 16px 0px rgba(208, 208, 208, 0.5); box-shadow: 2px 3px 16px 0px rgba(208, 208, 208, 0.5);
......
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