|
@@ -9,6 +9,9 @@ |
|
|
<el-select class="select" size="medium" v-model="selStatus" @change="selectChange"> |
|
|
<el-select class="select" size="medium" v-model="selStatus" @change="selectChange"> |
|
|
<el-option v-for="item in statusList" :key="item.k" :label="item.v" :value="item.k" /> |
|
|
<el-option v-for="item in statusList" :key="item.k" :label="item.v" :value="item.k" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
|
|
|
<el-select class="select" size="medium" v-model="selAvailable" @change="selectChange"> |
|
|
|
|
|
<el-option v-for="item in availableList" :key="item.k" :label="item.v" :value="item.k" /> |
|
|
|
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-button size="medium" icon="el-icon-refresh" @click="syncComputerNetwork" v-loading="syncLoading"> |
|
|
<el-button size="medium" icon="el-icon-refresh" @click="syncComputerNetwork" v-loading="syncLoading"> |
|
@@ -19,7 +22,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="table-container"> |
|
|
<div class="table-container"> |
|
|
<div style="min-height:600px;"> |
|
|
<div style="min-height:600px;"> |
|
|
<el-table border :data="tableData" style="width: 100%" v-loading="loading" stripe> |
|
|
|
|
|
|
|
|
<el-table border :data="tableData" style="width: 100%;min-width:1700px;" v-loading="loading" stripe> |
|
|
<el-table-column prop="ID" label="ID" align="center" header-align="center" width="60"></el-table-column> |
|
|
<el-table-column prop="ID" label="ID" align="center" header-align="center" width="60"></el-table-column> |
|
|
<el-table-column prop="SpecStr" :label="$t('resourcesManagement.resourceSpecification')" align="left" |
|
|
<el-table-column prop="SpecStr" :label="$t('resourcesManagement.resourceSpecification')" align="left" |
|
|
header-align="center" min-width="160"> |
|
|
header-align="center" min-width="160"> |
|
@@ -49,6 +52,14 @@ |
|
|
<span style="font-weight:600;font-size:14px;">{{ scope.row.UnitPrice }}</span> |
|
|
<span style="font-weight:600;font-size:14px;">{{ scope.row.UnitPrice }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="IsAvailableStr" :label="$t('resourcesManagement.resourceSpecificationIsAvailable')" align="center" |
|
|
|
|
|
header-align="center" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :style="{ color: scope.row.IsAvailable ? 'rgb(82, 196, 26)' : 'rgb(245, 34, 45)' }">{{ |
|
|
|
|
|
scope.row.IsAvailableStr |
|
|
|
|
|
}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column prop="StatusStr" :label="$t('resourcesManagement.status')" align="center" |
|
|
<el-table-column prop="StatusStr" :label="$t('resourcesManagement.status')" align="center" |
|
|
header-align="center" width="100"> |
|
|
header-align="center" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
@@ -60,7 +71,10 @@ |
|
|
<el-table-column :label="$t('operation')" align="center" header-align="center" width="100"> |
|
|
<el-table-column :label="$t('operation')" align="center" header-align="center" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.Status == '1' && !scope.row.UnitPrice"> |
|
|
<span v-if="scope.row.Status == '1' && !scope.row.UnitPrice"> |
|
|
<span class="op-btn" @click="showDialog('edit', scope.row)">{{ |
|
|
|
|
|
|
|
|
<span v-if="scope.row.IsAvailable" class="op-btn" @click="showDialog('edit', scope.row)">{{ |
|
|
|
|
|
$t('resourcesManagement.toSetPriceAndOnShelf') |
|
|
|
|
|
}}</span> |
|
|
|
|
|
<span v-else class="op-btn" style="color: rgb(187, 187, 187); cursor: not-allowed;">{{ |
|
|
$t('resourcesManagement.toSetPriceAndOnShelf') |
|
|
$t('resourcesManagement.toSetPriceAndOnShelf') |
|
|
}}</span> |
|
|
}}</span> |
|
|
</span> |
|
|
</span> |
|
@@ -71,9 +85,12 @@ |
|
|
}}</span> |
|
|
}}</span> |
|
|
</span> |
|
|
</span> |
|
|
<span v-if="scope.row.Status == '3' || scope.row.Status == '1' && scope.row.UnitPrice"> |
|
|
<span v-if="scope.row.Status == '3' || scope.row.Status == '1' && scope.row.UnitPrice"> |
|
|
<span class="op-btn" @click="onShelf(scope.row)">{{ |
|
|
|
|
|
|
|
|
<span v-if="scope.row.IsAvailable" class="op-btn" @click="onShelf(scope.row)">{{ |
|
|
$t('resourcesManagement.toOnShelf') |
|
|
$t('resourcesManagement.toOnShelf') |
|
|
}}</span> |
|
|
}}</span> |
|
|
|
|
|
<span v-else class="op-btn" style="color: rgb(187, 187, 187); cursor: not-allowed;">{{ |
|
|
|
|
|
$t('resourcesManagement.toSetPriceAndOnShelf') |
|
|
|
|
|
}}</span> |
|
|
</span> |
|
|
</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@@ -132,6 +149,8 @@ export default { |
|
|
queueList: [{ k: '', v: this.$t('resourcesManagement.allResQueue') }], |
|
|
queueList: [{ k: '', v: this.$t('resourcesManagement.allResQueue') }], |
|
|
selStatus: '', |
|
|
selStatus: '', |
|
|
statusList: [{ k: '', v: this.$t('resourcesManagement.allStatus') }, ...SPECIFICATION_STATUS], |
|
|
statusList: [{ k: '', v: this.$t('resourcesManagement.allStatus') }, ...SPECIFICATION_STATUS], |
|
|
|
|
|
selAvailable: '', |
|
|
|
|
|
availableList: [{ k: '', v: this.$t('resourcesManagement.resourceSpecificationIsAvailableAll') }, { k: '1', v: this.$t('resourcesManagement.available') }, { k: '2', v: this.$t('resourcesManagement.notAvailable') }], |
|
|
clusterList: [...CLUSTERS], |
|
|
clusterList: [...CLUSTERS], |
|
|
accCardTypeList: [...ACC_CARD_TYPE], |
|
|
accCardTypeList: [...ACC_CARD_TYPE], |
|
|
syncLoading: false, |
|
|
syncLoading: false, |
|
@@ -178,6 +197,7 @@ export default { |
|
|
const params = { |
|
|
const params = { |
|
|
queue: this.selQueue, |
|
|
queue: this.selQueue, |
|
|
status: this.selStatus, |
|
|
status: this.selStatus, |
|
|
|
|
|
available: this.selAvailable, |
|
|
page: this.pageInfo.curpage, |
|
|
page: this.pageInfo.curpage, |
|
|
pagesize: this.pageInfo.pageSize, |
|
|
pagesize: this.pageInfo.pageSize, |
|
|
}; |
|
|
}; |
|
@@ -201,6 +221,8 @@ export default { |
|
|
UpdatedTimeStr: formatDate(new Date(Spec.UpdatedTime * 1000), 'yyyy-MM-dd HH:mm:ss'), |
|
|
UpdatedTimeStr: formatDate(new Date(Spec.UpdatedTime * 1000), 'yyyy-MM-dd HH:mm:ss'), |
|
|
Status: Spec.Status.toString(), |
|
|
Status: Spec.Status.toString(), |
|
|
StatusStr: getListValueWithKey(this.statusList, Spec.Status.toString()), |
|
|
StatusStr: getListValueWithKey(this.statusList, Spec.Status.toString()), |
|
|
|
|
|
IsAvailable: Spec.IsAvailable, |
|
|
|
|
|
IsAvailableStr: Spec.IsAvailable ? this.$t('resourcesManagement.available') : this.$t('resourcesManagement.notAvailable'), |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
this.tableData = data; |
|
|
this.tableData = data; |
|
@@ -280,6 +302,11 @@ export default { |
|
|
type: 'info', |
|
|
type: 'info', |
|
|
message: this.$t('resourcesManagement.onShelfCode1001') |
|
|
message: this.$t('resourcesManagement.onShelfCode1001') |
|
|
}); |
|
|
}); |
|
|
|
|
|
} else if (type === 'on-shelf' && res.Code === 1003) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
type: 'info', |
|
|
|
|
|
message: this.$t('resourcesManagement.onShelfCode1003') |
|
|
|
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: 'error', |
|
|
type: 'error', |
|
|