algo_manage.vue 6.63 KB
<template>
  <div class="innnerBox">
    <div class="algobox">
      <el-row>
        <el-col :span="8" class="itembox" >
          <el-card shadow="always" class="sfbox">
            <div class="sfboxcontent"  @click="showsfdetail(1,'交通算法')">
              <div class="left-icon">
                <i class="icon-fanxing-teshucheliangzongliang"></i>
              </div>
              <div class="right-content">
                <div class="sflx">交通算法</div>
                <div class="sfzl">算法种类 {{jiaotong.length}}</div>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8" class="itembox">
          <el-card shadow="always" class="sfbox">
            <div class="sfboxcontent"  @click="showsfdetail(2,'城市综合治理算法')">
              <div class="left-icon">
                <i class="icon-fanxing-shanchu2"></i>
              </div>
              <div class="right-content">
                <div class="sflx">城市综合治理算法</div>
                <div class="sfzl">算法种类  {{zongzhi.length}}</div>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8" class="itembox" >
          <el-card shadow="always" class="sfbox">
            <div class="sfboxcontent"  @click="showsfdetail(3,'社区管理算法')">
              <div class="left-icon">
                <i class="el-icon-s-flag"></i>
              </div>
              <div class="right-content">
                <div class="sflx">社区管理算法</div>
                <div class="sfzl">算法种类  {{shequ.length}}</div>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8" class="itembox">
          <el-card shadow="always" class="sfbox">
            <div class="sfboxcontent"  @click="showsfdetail(4,'人脸识别算法')">
              <div class="left-icon">
                <i class="el-icon-user"></i>
              </div>
              <div class="right-content">
                <div class="sflx">人脸识别算法</div>
                <div class="sfzl">算法种类  {{renlian.length}}</div>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8" class="itembox">
          <el-card shadow="always" class="sfbox" >
            <div class="sfboxcontent" @click="showsfdetail(5,'语义分析算法')">
              <div class="left-icon">
                <i class="el-icon-question"></i>
              </div>
              <div class="right-content">
                <div class="sflx">语义分析算法</div>
                <div class="sfzl">算法种类 {{yuyi.length}}</div>
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8" class="itembox">
          <el-card shadow="always" class="sfbox">
            <div class="sfboxcontent"  @click="showsfdetail(6,'文本识别算法')">
              <div class="left-icon">
                <i class="el-icon-s-claim"></i>
              </div>
              <div class="right-content">
                <div class="sflx">文本识别算法</div>
                <div class="sfzl">算法种类  {{wenben.length}}</div>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
    <el-dialog :title="title" :visible.sync="isShow" width="80%" class="add-algomanage-box">
			<div class="detailtable">
				 <el-table
						:data="tableData"
						height="500px"
						style="width: 100%">
						<el-table-column
							prop="sfname"
							label="算法名称"
						>
						</el-table-column>
						<el-table-column
							prop="sflb"
							label="算法类别">
						</el-table-column>
						<el-table-column
							prop="sfly"
							label="来源">
						</el-table-column>
						<el-table-column
							prop="yjzc"
							label="硬件支持">
						</el-table-column>
						<el-table-column
							prop="cj"
							label="厂家">
						</el-table-column>
						<el-table-column
							prop="fbsj"
							label="发布时间">
						</el-table-column>
						<el-table-column
							prop="bbh"
							label="版本号">
						</el-table-column>
						<el-table-column
							prop="info"
							label="其他信息">
						</el-table-column>
					</el-table>
			</div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="isShow = false">取 消</el-button>
        <el-button type="primary" @click="isShow = false">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {zongzhi,jiaotong,shequ,renlian,yuyi,wenben} from './algotype'
export default {
  data() {
    return {
      tableData: [],
      isShow: false,
			details: [],
			title:'',
			jiaotong:[],
			zongzhi:[],
			renlian:[],
			shequ:[],
			yuyi:[],
			wenben:[]
    };
  },
  methods: {
		showsfdetail(index,title){
			this.title = title;
			this.isShow = true;

			switch (index) {
				case 1:
					this.tableData = this.jiaotong
					break;
				case 2:
					this.tableData = this.zongzhi
					break;
				case 3:
					this.tableData = this.shequ
					break;
				case 4:
					this.tableData = this.renlian
					break;
				case 5:
					this.tableData = this.yuyi
					break;
				case 6:
					this.tableData = this.wenben
					break;
				default:
					break;
			}
		}
	},
	destroyed() {
			this.zongzhi = []
	},
  created() {

		//jiaotong
		this.jiaotong = JSON.parse(JSON.stringify(jiaotong));
		this.zongzhi = JSON.parse(JSON.stringify(zongzhi));
		this.shequ = JSON.parse(JSON.stringify(shequ));
		this.renlian =  JSON.parse(JSON.stringify(renlian));
		this.wenben =  JSON.parse(JSON.stringify(wenben));
		this.yuyi = JSON.parse(JSON.stringify(yuyi));
		var plugData = JSON.parse(localStorage.getItem("plugData")?localStorage.getItem("plugData"):'[]');
		plugData.map(ele=> {
			if(ele.algotype == 'jiaotong'){
				this.jiaotong.push(ele);
			}
			if(ele.algotype == 'zongzhi'){
					this.zongzhi.push(ele);
			}
			if(ele.algotype == 'shequ'){
					this.shequ.push(ele);
			}
			if(ele.algotype == 'renlian'){
					this.renlian.push(ele);
			}
			if(ele.algotype == 'yuyi'){
					this.yuyi.push(ele);
			}
			if(ele.algotype == 'wenben'){
				 this.wenben.push(ele);
			}
		})
  }
};
</script>
<style lang="stylus" scoped>
.itembox {
  padding: 40px 0px;
}

.algobox {
  min-height: 800px;
}

.sfbox {
  height: 180px;
  width: 400px;
  margin: 0 auto;
  display: flex;
	cursor pointer
}
.sfboxcontent{
	display flex
}

.left-icon {
  line-height: 130px;
	padding-left 40px;
  i {
    font-size: 40px;
		color #1890ff
  }
}
.right-content{
	font-size 20px
	margin-left 70px
	.sflx{
		margin-top 30px
		font-size 24px
	}
	.sfzl{
		margin-top 20px
		color #696c70
	}
}
</style>