Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
wuhongjian 2022-06-22 19:11:36 +08:00
commit 58ff37ac48
3 changed files with 399 additions and 179 deletions

View File

@ -1,10 +1,7 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-ability__bsabilityai"> <div class="mod-ability__bsabilityai">
<el-form <el-form :inline="true" :model="dataForm">
:inline="true"
:model="dataForm"
>
<el-form-item> <el-form-item>
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
@ -13,7 +10,9 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList2(dataForm.name)">{{ $t("query") }}</el-button> <el-button @click="getDataList2(dataForm.name)">{{
$t("query")
}}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="info" @click="exportHandle()">{{ <el-button type="info" @click="exportHandle()">{{
@ -36,7 +35,7 @@
>{{ $t("deleteBatch") }}</el-button >{{ $t("deleteBatch") }}</el-button
> >
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -45,7 +44,7 @@
:data="dataList" :data="dataList"
border border
@selection-change="dataListSelectionChangeHandle" @selection-change="dataListSelectionChangeHandle"
style="width: 100%;" style="width: 100%"
:height="qp ? '810px' : '650px'" :height="qp ? '810px' : '650px'"
> >
<el-table-column <el-table-column
@ -70,9 +69,7 @@
show-overflow-tooltip="true" show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{ findValue(scope.row.infoList, item.attrType) }}
findValue(scope.row.infoList, item.attrType)
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -101,7 +98,33 @@
<el-button type="text" size="small" @click="showDetail(scope.row)" <el-button type="text" size="small" @click="showDetail(scope.row)"
>展示</el-button >展示</el-button
> >
<el-button type="text" size="small" @click="showDocument(scope.row)">开发文档</el-button> <el-button type="text" size="small" @click="showDocument(scope.row)"
>开发文档</el-button
>
<el-button
type="text"
size="small"
@click="applyAndAssembly(scope.row)"
>应用与组件</el-button
>
<el-button
type="text"
size="small"
@click="applyAndDataResource(scope.row)"
>应用与数据资源</el-button
>
<el-button
type="text"
size="small"
@click="applyAndProject(scope.row)"
>应用与项目</el-button
>
<el-button
type="text"
size="small"
@click="applyAndInfrastructure(scope.row)"
>应用与基础设施</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -122,182 +145,298 @@
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getDataList" @refreshDataList="getDataList"
></add-or-update> ></add-or-update>
<relate-application
v-if="relateApplicationResourceVisible"
ref="relateApplication"
:relateInfo="relationData"
@isShowRelatePopup="handleIsShowRelatePopupApply"
></relate-application>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from './bsabilityservice-add-or-update' import AddOrUpdate from "./bsabilityservice-add-or-update";
import dictionaries from '@/utils/dictionaries' import dictionaries from "@/utils/dictionaries";
import qs from 'qs' import RelateApplication from "./bsabilityai-relate-application.vue";
import { type } from 'os' import qs from "qs";
import { type } from "os";
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data() {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: '/resource/page', getDataListURL: "/resource/page",
getDataListIsPage: true, getDataListIsPage: true,
exportURL: '/ability/bsabilityai/export', exportURL: "/ability/bsabilityai/export",
deleteURL: '/resource/delete', deleteURL: "/resource/delete",
deleteIsBatch: true deleteIsBatch: true,
}, },
disabled: false, disabled: false,
sceneArr: dictionaries.sceneArr, sceneArr: dictionaries.sceneArr,
fieldArr: dictionaries.fieldArr, fieldArr: dictionaries.fieldArr,
shareFormArr: dictionaries.shareFormArr, shareFormArr: dictionaries.shareFormArr,
dataForm: { dataForm: {
name: '', name: "",
creator: '', creator: "",
selectType: 0, selectType: 0,
delFlag: 0, delFlag: 0,
type: '应用资源' type: "应用资源",
}, },
qp: false qp: false,
} relateApplicationResourceVisible: false,
relationData: {}, //穿
};
}, },
watch: {}, watch: {},
components: { components: {
AddOrUpdate AddOrUpdate,
RelateApplication,
}, },
created () { created() {
this.dataForm.name = '' this.dataForm.name = "";
this.dataForm.type = '应用资源' this.dataForm.type = "应用资源";
}, },
mounted () { mounted() {
window.addEventListener('resize', this.a) window.addEventListener("resize", this.a);
this.fullScreen() this.fullScreen();
}, },
methods: { methods: {
reset () { reset() {
this.$http.get( this.$http
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({ .get(
// order: this.order, this.mixinViewModuleOptions.getDataListURL +
// orderField: this.orderField, "?" +
// type: '', qs.stringify({
page: 1, // order: this.order,
selectType: 0, // orderField: this.orderField,
limit: 10, // type: '',
delFlag: 0, page: 1,
creator: '', selectType: 0,
type: '应用资源', limit: 10,
name: '' delFlag: 0,
creator: "",
type: "应用资源",
name: "",
})
)
.then(({ data: res }) => {
this.dataForm.name = "";
if (res.code !== 0) {
this.dataList = [];
this.total = 0;
return this.$message.error(res.msg);
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
: res.data;
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data);
}
this.dataListLoading = false;
}) })
.catch(() => {
).then(({ data: res }) => { this.dataListLoading = false;
this.dataForm.name = '' });
if (res.code !== 0) {
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false
}).catch(() => {
this.dataListLoading = false
})
}, },
showDetail (val) { showDetail(val) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true;
this.disabled = false this.disabled = false;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false this.$refs.addOrUpdate.UpdateState = false;
this.$refs.addOrUpdate.dataFormShowDetails = val this.$refs.addOrUpdate.dataFormShowDetails = val;
this.$refs.addOrUpdate.init() this.$refs.addOrUpdate.init();
}) });
this.disabled = true this.disabled = true;
}, },
showDocument (val) { showDocument(val) {
console.log(val) console.log(val);
window.open(window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type, '_blank') window.open(
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
"_blank"
);
}, },
findValue (list, type) { findValue(list, type) {
const found = list.find(item => item.attrType === type) const found = list.find((item) => item.attrType === type);
if (found) { if (found) {
return found.attrValue return found.attrValue;
} else { } else {
return '暂无数据' return "暂无数据";
} }
}, },
getDataList2 (names) { getDataList2(names) {
if (names != null) { if (names != null) {
this.$http.get( this.$http
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({ .get(
// order: this.order, this.mixinViewModuleOptions.getDataListURL +
// orderField: this.orderField, "?" +
// type: '', qs.stringify({
pageNum: 1, // order: this.order,
pageSize: this.limit, // orderField: this.orderField,
type: '应用资源', // type: '',
creator: '', pageNum: 1,
selectType: 0, pageSize: this.limit,
delFlag: 0, type: "应用资源",
name: names creator: "",
}) selectType: 0,
) delFlag: 0,
name: names,
})
)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.dataList = [] this.dataList = [];
this.total = 0 this.total = 0;
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
if (res.data.list.length !== 0) { if (res.data.list.length !== 0) {
this.dataList = res.data.list this.dataList = res.data.list;
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
if (this.mixinViewModuleOptions.requestCallback) { if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data);
} }
this.dataListLoading = false this.dataListLoading = false;
} else { } else {
this.$message.error('未查询到相关信息') this.$message.error("未查询到相关信息");
this.reset() this.reset();
} }
}).catch(() => {
this.dataListLoading = false
}) })
.catch(() => {
this.dataListLoading = false;
});
} else { } else {
this.$message.error('查询不能输入为空') this.$message.error("查询不能输入为空");
} }
}, },
fullScreen () { fullScreen() {
if (window.outerHeight === screen.availHeight) { if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) { if (window.outerWidth === screen.availWidth) {
console.log( console.log(
'全屏1', "全屏1",
window.outerHeight, window.outerHeight,
screen.availHeight, screen.availHeight,
window.outerWidth, window.outerWidth,
screen.availWidth screen.availWidth
) );
this.qp = false this.qp = false;
} else { } else {
console.log( console.log(
'不是全屏2', "不是全屏2",
window.outerHeight, window.outerHeight,
screen.availHeight, screen.availHeight,
window.outerWidth, window.outerWidth,
screen.availWidth screen.availWidth
) );
this.qp = true this.qp = true;
} }
} else { } else {
console.log( console.log(
'不是全屏3', "不是全屏3",
window.outerHeight, window.outerHeight,
screen.availHeight, screen.availHeight,
window.outerWidth, window.outerWidth,
screen.availWidth screen.availWidth
) );
this.qp = true this.qp = true;
} }
} },
} //
} applyAndAssembly(val) {
console.log("vvvv", val);
//idid,type
let type = "组件服务";
let id = val.id;
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
params: {
keyId: id,
type: type,
referenceName: "",
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
console.log("rrrrressssz", res.data);
this.relateApplicationResourceVisible = true;
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
console.log(" this.relationData", this.relationData);
//
});
},
//
applyAndDataResource(val) {
console.log("数据资源");
},
//
applyAndProject(val) {
let type = "项目";
let id = val.id;
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
params: {
keyId: id,
type: type,
referenceName: "",
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
console.log("rrrrressssx", res.data);
this.relateApplicationResourceVisible = true;
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
//
});
},
//
applyAndInfrastructure(val) {
let type = "基础设施";
let id = val.id;
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
params: {
keyId: id,
type: type,
referenceName: "",
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
console.log("rrrrressssj", res.data);
this.relateApplicationResourceVisible = true;
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
//
});
},
//
handleIsShowRelatePopupApply(type) {
this.relateApplicationResourceVisible = type;
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-tooltip__popper { .el-tooltip__popper {

View File

@ -11,9 +11,7 @@
<el-button type="primary" class="button-new" @click="flashTableData" <el-button type="primary" class="button-new" @click="flashTableData"
>查询</el-button >查询</el-button
> >
<el-button type="primary" class="button-new" @click="restTableData" <el-button @click="restTableData">重置</el-button>
>重置</el-button
>
<div style="float: right"> <div style="float: right">
<el-button <el-button
size="mini" size="mini"

View File

@ -1,85 +1,168 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-pay__order"> <div class="mod-bscatalogue__bscatalogue">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true">
<el-form-item> <el-form-item label="项目名称:">
<el-input v-model="dataForm.orderId" :placeholder="$t('order.orderId')" clearable></el-input> <el-input
v-model="queryData.projectName"
placeholder="请输入项目名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="应用名称:">
<el-input
v-model="queryData.applyName"
placeholder="请输入应用名称"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.userId" :placeholder="$t('order.userId')" clearable></el-input> <el-button type="primary" @click="searchTableData">查询</el-button>
</el-form-item> <el-button @click="resetTableData">重置</el-button>
<el-form-item>
<ren-select v-model="dataForm.status" dict-type="order_status" :placeholder="$t('order.status')"></ren-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> <el-table row-key="id" :data="dataList" border style="width: 100%">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> <el-table-column
<el-table-column prop="orderId" :label="$t('order.orderId')" header-align="center" align="center"></el-table-column> prop="projectName"
<el-table-column prop="productName" :label="$t('order.productName')" header-align="center" align="center"></el-table-column> label="项目名称"
<el-table-column prop="payAmount" :label="$t('order.payAmount')" header-align="center" align="center"></el-table-column> header-align="center"
<el-table-column prop="status" :label="$t('order.status')" header-align="center" align="center"> align="center"
<template slot-scope="scope"> ></el-table-column>
{{ $getDictLabel("order_status", scope.row.status) }} <el-table-column
</template> prop="applyName"
</el-table-column> label="应用名称"
<el-table-column prop="payAt" :label="$t('order.payAt')" header-align="center" align="center"></el-table-column> header-align="center"
<el-table-column prop="createDate" :label="$t('order.createDate')" header-align="center" align="center"></el-table-column> align="center"
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> >
<template slot-scope="scope">
<el-button v-if="scope.row.status === 0" type="text" size="small" @click="payHandle(scope.row.orderId)">{{ $t('order.pay') }}</el-button>
<el-button v-if="scope.row.status === 0" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column> </el-table-column>
<el-table-column
prop="useAbilityName"
label="使用能力名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="capabilityType"
label="能力类型"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="viewsNumber"
label="浏览次数"
header-align="center"
align="center"
></el-table-column>
<!-- <el-table-column label="操作" header-align="center" align="center">
</el-table-column> -->
</el-table> </el-table>
<!-- 分页组件 -->
<el-pagination <el-pagination
:current-page="page" style="margin-top: 20px; text-align: right"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryData.pageIndex"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="limit" :page-size="queryData.pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle" :total="queryData.total"
@current-change="pageCurrentChangeHandle"> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from "@/mixins/view-module";
// import AddOrUpdate from './order-add-or-update' // import AddOrUpdate from './order-add-or-update'
import {addDynamicRoute} from "@/router"; import { addDynamicRoute } from "@/router";
export default { export default {
mixins: [mixinViewModule], // mixins: [mixinViewModule],
data () { data() {
return { return {
mixinViewModuleOptions: { queryData: {
getDataListURL: '/pay/order/page', projectName: "",
getDataListIsPage: true, applyName: "",
deleteURL: '/pay/order', pageIndex: 1,
deleteIsBatch: true pageSize: 10,
total: 0,
}, },
dataForm: { dataList: [
orderId: '', {
status: '', projectName: "人员聚集算法任务",
userId: '' applyName: "已创建",
} useAbilityName: "人员聚集",
} capabilityType: "视频类",
viewsNumber: "100",
},
],
};
}, },
components: { components: {
// AddOrUpdate // AddOrUpdate
}, },
mounted() {
//this.getTableData();
},
methods: { methods: {
payHandle (orderId) { getTableData() {
window.open(`${window.SITE_CONFIG['apiURL']}/pay/alipay/webPay?orderId=` + orderId); //
} this.$http
} .get("/taskList/tasklistcontroller/selectTaskList", {
} params: {
page: this.queryData.pageIndex,
pageSize: this.queryData.pageSize,
projectName: this.queryData.projectName,
applyName: this.queryData.applyName,
},
})
.then((res) => {
console.log(res);
if (res.status === 200) {
this.dataList = res.data.taskEntityList;
this.queryData.total = parseInt(res.data.num);
}
})
.catch(() => {});
},
getStatusCnName(val) {
const arr = this.statusOptions.filter((i) => {
return i.value === val;
});
if (arr.length >= 0) {
return arr[0].label;
}
return "未知状态";
},
//
resetTableData() {
this.queryData.projectName = "";
this.queryData.applyName = "";
this.getTableData();
},
searchTableData() {
this.queryData.pageIndex = 1;
this.getTableData();
},
//
handleSizeChange(value) {
this.queryData.pageSize = value;
this.getTableData();
},
//
handleCurrentChange(val) {
this.queryData.pageIndex = val;
this.getTableData();
},
},
};
</script> </script>
<style lang="scss" scoped>
.monitoring-top {
margin: 10px 0;
}
</style>