123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <template>
- <div>
- <search-layout :needBox="true">
-
- <template slot="searchItem2">
- <span class="label">算法名称</span>
- <el-input
- v-model="searchParams.algorithmName"
- size="small"
- clearable
- placeholder="请输入"
- maxlength="60"
- >
- </el-input>
- </template>
- <template slot="searchItem3">
- <span class="label">算法描述</span>
- <el-input
- v-model="searchParams.description"
- size="small"
- clearable
- placeholder="请输入"
- maxlength="60"
- >
- </el-input>
- </template>
- <!--<template slot="searchItem4">
- <span class="label">校验状态</span>
- <el-select v-model="searchParams.validationStatus">
- <el-option
- v-for="item in validationStatusList"
- :label="item.caption"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </template>-->
- <template slot="searchBtn1">
- <el-button type="primary" @click="doSearch">查询</el-button>
- </template>
- <template slot="searchBtn2">
- <el-button type="primary" @click="doReset">重置</el-button>
- </template>
- </search-layout>
- <div class="myTabsBox myTabsBoxThreeTabs">
-
- { addBtn: true}
- </div>
- <tableList
- ref="table"
- style="margin: 0 30px"
- :columns="columns"
- :getDataWay="getDataWay"
- :pagination="pagination"
- tooltip-effect="light"
- index
- >
-
- </tableList>
- </div>
- </template>
- <script>
- import searchLayout from "@/components/grid/searchLayout";
- import tableList from "@/components/grid/TableList";
- export default {
- name: "algorithmsPlatformList", // 算法平台
- components: { searchLayout, tableList },
- data() {
- return {
- searchParams: {
- //搜索参数
- //algorithmCode: "", // ID
- algorithmName: "", // 算法名称
- description: "", // 算法描述
- //uploadMode: "", // 私有类型
- },
- getDataWay:{
- //加载表格数据
- dataType: "url",
- //dataType: "data",
- type: "post",
- // firstRequest: false,
- data: this.$api.algorithmsLibrary.selectAlgoPlatformList,
- /*data:[
- {
- algorithmCode:'111',
- algorithmName:'111',
- description:
- '打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲哈维打款哈对我来讲'
- }
- ],*/
- param: {},
- },
- columns: [
-
- {
- label: "ID",
- prop: "algorithmCode",
- },
- {
- label: "算法名称",
- prop: "algorithmName",
- },
- {
- label: "算法描述",
- prop: "description",
- showOverflowTooltip: true
- },
- ],
- pagination: {
- //分页使用
- currentPage: 1,
- pageSize: 10,
- position: "right",
- pageSizes: [10, 30, 50, 100, 200],
- layout: "sizes, total, prev, pager, next, jumper",
- },
- };
- },
- computed: {
-
- },
- methods: {
- doSearch() {
- this.$nextTick(() => {
- this.refreshList(this.searchParams);
- });
- },
-
- refreshList(param) {
- param
- ? this.$refs["table"].loadData(param)
- : this.$refs["table"].loadData();
- },
- doReset() {
- this.searchParams = {
- //algorithmCode: "",
- algorithmName: "",
- description: "",
- //uploadMode: "",
- };
- this.doSearch();
- },
- addOne() {
-
- },
- editRow(row) {
-
- },
- delOne(row) {
- this.$confirm("确认是否删除?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- this.$axios({
- method: "post",
- url: this.$api.algorithmsLibrary.deleteByid,
- data: {
- id: row.id,
- },
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success("删除成功");
- } else {
- this.$message.error(res.message || "删除失败");
- }
- this.doSearch();
- });
- });
- },
- shareRow(row) {
- this.$confirm("确认是否分享?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- this.$axios({
- method: "post",
- url: this.$api.algorithmsLibrary.shareAlgorithm,
- data: {
- id: row.id,
- },
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success("分享成功");
- } else {
- this.$message.error(res.message || "分享失败");
- }
- this.doSearch();
- });
- });
- },
- },
- async mounted() {
- /*await this.$dicsListsInit({
- validationStatusList: "validationStatus",
- });*/
- },
- };
- </script>
- <style scoped lang="less">
- .tabsBox {
- position: relative;
- overflow: hidden;
- .el-button {
- position: absolute;
- right: 40px;
- top: 45px;
- }
- }
- .myTabsBox{
- min-height:29px;
- }
- </style>
|