|
@@ -6,9 +6,9 @@
|
|
|
@keyup.enter.native="getDataList()"
|
|
|
>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="addOrUpdateHandle()"
|
|
|
+ <!-- <el-button type="primary" @click="addOrUpdateHandle()"
|
|
|
>新增应用</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-form-item>
|
|
|
<el-input
|
|
|
v-model="dataForm.applicationName"
|
|
@@ -22,14 +22,14 @@
|
|
|
<el-select
|
|
|
clearable
|
|
|
label="应用类型"
|
|
|
- v-model="dataForm.applicationType"
|
|
|
+ v-model="dataForm.deployDeviceId"
|
|
|
@change="getDataListByType(dataForm.applicationType)"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="data in applicationTypeOptions"
|
|
|
- :key="data"
|
|
|
- :label="data"
|
|
|
- :value="data"
|
|
|
+ v-for="data in deployDevices"
|
|
|
+ :key="data.edgenodesId"
|
|
|
+ :label="data.edgenodesName"
|
|
|
+ :value="data.edgenodesId"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -84,6 +84,13 @@
|
|
|
label="应用状态"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="deployDeviceName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="部署设备"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column
|
|
|
prop="parentProjectName"
|
|
|
header-align="center"
|
|
@@ -184,6 +191,7 @@ export default {
|
|
|
dataForm: {
|
|
|
applicationType: "",
|
|
|
applicationName: "",
|
|
|
+ deployDeviceId:"",
|
|
|
},
|
|
|
dataList: [],
|
|
|
pageIndex: 1,
|
|
@@ -196,6 +204,9 @@ export default {
|
|
|
filterVal: "",
|
|
|
applicationTypeOptions: [
|
|
|
],
|
|
|
+ deployDevices:[
|
|
|
+
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -209,19 +220,31 @@ export default {
|
|
|
// 获取数据列表
|
|
|
getDataList() {
|
|
|
this.dataListLoading = true;
|
|
|
- this.$http({
|
|
|
+ /* this.$http({
|
|
|
url: this.$http.adornUrl("/category/select"),
|
|
|
method: "get",
|
|
|
}).then(({ data }) => {
|
|
|
this.applicationTypeOptions = this.unique(data.list);
|
|
|
- });
|
|
|
+ }); */
|
|
|
+ //获取所有边缘结点
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/generator/edgenodes/list'),
|
|
|
+ method: 'get',
|
|
|
+ params: this.$http.adornParams({
|
|
|
+
|
|
|
+ })
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.deployDevices=data.page.list;
|
|
|
+ var center={edgenodesId:0,edgenodesName:"中心云"};
|
|
|
+ this.deployDevices.push(center);
|
|
|
+ })
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl("/generator/applications/list"),
|
|
|
method: "get",
|
|
|
params: this.$http.adornParams({
|
|
|
page: this.pageIndex,
|
|
|
limit: this.pageSize,
|
|
|
- applicationType: this.dataForm.applicationType,
|
|
|
+ deployDeviceId: this.dataForm.deployDeviceId,
|
|
|
applicationName: this.dataForm.applicationName,
|
|
|
}),
|
|
|
}).then(({ data }) => {
|
|
@@ -357,10 +380,11 @@ export default {
|
|
|
// 更新image状态
|
|
|
async updateImage(name) {
|
|
|
const { data } = await this.$http({
|
|
|
- url: this.$http.adornUrl("/generator/images/list"),
|
|
|
+ url: this.$http.adornUrl("/generator/images/listAll"),
|
|
|
method: "get",
|
|
|
});
|
|
|
- const image = data.page.list.find((item) => item.imageName == name);
|
|
|
+ console.log(data.list)
|
|
|
+ const image = data.list.find((item) => item.imageName == name);
|
|
|
if (image) {
|
|
|
await this.$http({
|
|
|
url: this.$http.adornUrl("/generator/images/update"),
|