Commit fe236f8b authored by Administrator's avatar Administrator

Merge branch 'feature/repository_knowledge' into develop

parents baecd915 c5922fb0
......@@ -400,6 +400,7 @@ class DevicesController extends Controller
->join('status as s', 'r.policestatus', '=', 's.id')
->join('device as d', 'r.devicenumber', '=', 'd.devicenum')
->select('r.*', 's.status_name', 'd.id as deid')
->orderByDesc('r.starttime')
->get();
} else {
$data = DB::table('reportpolice as r')
......@@ -407,6 +408,7 @@ class DevicesController extends Controller
->join('device as d', 'r.devicenumber', '=', 'd.devicenum')
->where('d.uid', '=', Auth::id())
->select('r.*', 's.status_name', 'd.id as deid')
->orderByDesc('r.starttime')
->get();
}
return $this->jsonSuccessData($data);
......
......@@ -36,7 +36,7 @@ const meetemergencyRoutes = {
meta: { title: '案例库', icon: 'chart', permissions: ['manage admin'] },
}, {
path: 'zhishi',
component: () => import('@/views/meetemergency/zhishi'),
component: () => import('@/views/meetemergency/knowledge/index'),
name: 'zhishi',
meta: { title: '知识库', icon: 'chart', permissions: ['manage admin'] },
}],
......
......@@ -3,7 +3,7 @@
<div class="filter-container">
<el-form ref="query" style="display: inline-block;">
<el-input placeholder="案例名称" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-input placeholder="案例id" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-input placeholder="类型" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search">
{{ $t('table.search') }}
</el-button>
......@@ -20,13 +20,12 @@
</div>
<el-table :data="tableData" border style="width: 100%">
<el-table-column fixed prop="date" label="日期" width="150"></el-table-column>
<el-table-column prop="name" label="案例名称" width="120"></el-table-column>
<el-table-column prop="province" label="案例类型" width="120"></el-table-column>
<el-table-column prop="city" label="案例是否执行" width="120"></el-table-column>
<el-table-column prop="address" label="案例执行地址" width="300"></el-table-column>
<el-table-column prop="zip" label="案例内容" width="120"></el-table-column>
<el-table-column prop="title" label="案例名称" width="200"></el-table-column>
<el-table-column prop="type" label="案例类型" width="120"></el-table-column>
<el-table-column prop="body" label="案例内容"></el-table-column>
<el-table-column fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">查看</el-button>
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
......@@ -43,32 +42,19 @@ export default {
return {
tableData: [{
date: '2016-05-02',
name: '一级应急案例',
province: '一级案例',
city: '案例执行',
address: '上海市普陀区金沙江路 1518 弄',
zip: '石家庄第三期案例',
title: '基于无线技术气体报警空气系统的设计方案',
type: '一级案例',
body: 'GPRS/3G/4G无线通讯技术,WiFi技术等遍布人们的生活和生产活动 工业气体报警探测器系统无线化已成为工业安全生产中的发展...',
}, {
date: '2016-05-04',
name: '二级应急案例',
province: '二级应急案例',
city: '案例取消',
address: '上海市普陀区金沙江路 1517 弄',
zip: '石家庄第三期案例',
}, {
date: '2016-05-01',
name: '三级级应急案例',
province: '三级级应急案例',
city: '案例执行',
address: '上海市普陀区金沙江路 1519 弄',
zip: '石家庄第三期案例',
date: '2016-05-02',
title: '防止有毒有害气体中毒十个必须知道的内容',
type: '一级案例',
body: '关于毒气的危害本公司的专家总结出一下几点。下面就由本公司的专家为您讲解下赌气的危害。',
}, {
date: '2016-05-03',
name: '四级级级应急案例',
province: '四级级级应急案例',
city: '案例取消',
address: '上海市普陀区金沙江路 1516 弄',
zip: '石家庄第三期案例',
date: '2016-05-02',
title: '居民燃气报警及控制系统解决方案',
type: '一级案例',
body: '它能有效地避免因燃气泄漏而引起的爆炸、火灾、中毒等恶性事故 已经在世界上大部分国家或地区广泛应用。',
}],
};
},
......
......@@ -3,7 +3,7 @@
<div class="filter-container">
<el-form ref="query" style="display: inline-block;">
<el-input placeholder="预案名称" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-input placeholder="预案模板id" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-input placeholder="预案编号" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search">
{{ $t('table.search') }}
</el-button>
......@@ -20,18 +20,18 @@
</div>
<div>
<el-table :data="tableData" style="width: 100%">
<el-table-column label="发布日期" width="180">
<el-table-column label="发布日期" width="160">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="预案版本号" width="180">
<el-table-column label="预案编号" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="预案类别" width="180">
<el-table-column label="预案类别" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.leibie }}</span>
</template>
......@@ -41,7 +41,7 @@
<span style="margin-left: 10px">{{ scope.row.infodanwei }}</span>
</template>
</el-table-column>
<el-table-column label="使用领域" width="180">
<el-table-column label="使用领域" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.shiyong }}</span>
</template>
......@@ -51,12 +51,12 @@
<span style="margin-left: 10px">{{ scope.row.guanlian }}</span>
</template>
</el-table-column>
<el-table-column label="事件级别" width="180">
<el-table-column label="事件级别" width="90">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.shjianjibei }}</span>
</template>
</el-table-column>
<el-table-column label="预案内容" width="180">
<el-table-column label="预案内容" width="300">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.yuaninfo }}</span>
</template>
......@@ -72,7 +72,7 @@
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" width="280px">
<el-table-column label="操作" width="100px">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">查询</el-button>
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
......@@ -96,44 +96,44 @@ export default {
address: '上海市普陀区金沙江路 1518 弄一级预案',
id: 1,
leibie: '预案1',
infodanwei: '石家庄哈哈哈公司',
infodanwei: '河北泽宏科技股份有限公司',
shiyong: '报警使用',
guanlian: '石家庄xxx爆炸',
shjianjibei: '1级',
yuaninfo: '哈哈哈哈我是预案内容也不知道写点啥',
yuaninfo: '员工处置燃气管道或设备设施突发泄漏时的应急能力,有效地实施燃气泄漏报警及燃气泄漏应急处理,预防和减少因燃气泄露有可能造成的严重后果,特制定燃气...',
}, {
date: '2016-05-04',
name: '二级预案',
address: '上海市普陀区金沙江路 1517 弄二级预案',
id: 2,
leibie: '预案1',
infodanwei: '石家庄酒水公司',
infodanwei: '河北泽宏科技股份有限公司',
shiyong: '消防使用',
guanlian: '石家庄xxx爆炸',
shjianjibei: '1级',
yuaninfo: '哈哈哈哈我是预案内容也不知道写点啥',
yuaninfo: '员工处置燃气管道或设备设施突发泄漏时的应急能力,有效地实施燃气泄漏报警及燃气泄漏应急处理,预防和减少因燃气泄露有可能造成的严重后果,特制定燃气...',
}, {
date: '2016-05-01',
name: '三级预案',
address: '上海市普陀区金沙江路 1519 弄三级预案',
id: 3,
leibie: '预案3',
infodanwei: '石家庄花露水公司',
infodanwei: '河北泽宏科技股份有限公司',
shiyong: '火灾使用',
guanlian: '石家庄xxx爆炸',
shjianjibei: '3级',
yuaninfo: '哈哈哈哈我是预案内容也不知道写点啥',
yuaninfo: '员工处置燃气管道或设备设施突发泄漏时的应急能力,有效地实施燃气泄漏报警及燃气泄漏应急处理,预防和减少因燃气泄露有可能造成的严重后果,特制定燃气...',
}, {
date: '2016-05-03',
name: '四级预案',
address: '上海市普陀区金沙江路 1516 弄四级预案',
id: 4,
leibie: '预案2',
infodanwei: '石家庄花神公司',
infodanwei: '河北泽宏科技股份有限公司',
shiyong: '报警使用',
guanlian: '石家庄xxx爆炸',
shjianjibei: '5级',
yuaninfo: '哈哈哈哈我是预案内容也不知道写点啥',
yuaninfo: '员工处置燃气管道或设备设施突发泄漏时的应急能力,有效地实施燃气泄漏报警及燃气泄漏应急处理,预防和减少因燃气泄露有可能造成的严重后果,特制定燃气...',
}],
};
},
......
<template>
<div class="app-container">
<div class="filter-container">
<el-form ref="query" style="display: inline-block;">
<el-input placeholder="知识库编号" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-input placeholder="文件标题" clearable style="width: 200px;" class="filter-item" name="userskk" />
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search">
{{ $t('table.search') }}
</el-button>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-plus">
{{ $t('table.add') }}
</el-button>
</el-form>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-download">
{{ $t('table.export') }}
</el-button>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-upload">
导入
</el-button>
</div>
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="repository_number" label="知识库编号" width="150"></el-table-column>
<el-table-column prop="title" label="标题" width="150"></el-table-column>
<el-table-column prop="description" label="描述"></el-table-column>
<el-table-column label="文件" width="200">
<template slot-scope="scope">
<el-link prop="success">{{ scope.row.file }}</el-link>
</template>
</el-table-column>
<el-table-column prop="date" label="日期" width="150"></el-table-column>
<el-table-column fixed="right" label="操作" width="150">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import waves from '@/directive/waves'; // 水波纹效果
export default {
directives: { waves },
data() {
return {
tableData: [{
repository_number: 'ZS201605020303',
title: '家用报警器说明书',
description: 'XT-8800G10-B 使用说明书 1 系统前言 无线 GSM 智能商用/家用报警系统,它采用进口微处理器,结合先进的 GSM 数字信号处 理技术,创新研制的 GSM 无线移动.',
file: '家用报警器说明书.doc',
date: '2016-05-04 12:55',
}, {
repository_number: 'ZS201605020304',
title: '家用燃气报警器规范',
description: '家用燃气泄漏报警器 本标准规定了家用燃气泄漏报警器的技术要求、试验方法、检验规则、标志、包装、运 输和储存。 本标准适用于人工燃气、天然气、液化石油...',
file: '家用燃气报警器规范.doc',
date: '2016-05-04 12:55',
}, {
repository_number: 'ZS201605020305',
title: '家用燃气泄漏报警器的设计定稿版',
description: '家用燃气泄漏报警器的 设计 HUA system office room 【HUA16H-TTMS2A-HUAS8Q8-HUAH1688】 南京邮电大学高等教育自学考试 专接本专业 毕 业 设 计 (论文) 设...',
file: '家用燃气泄漏报警器的设计定稿版.doc',
date: '2016-05-04 12:55',
}, {
repository_number: 'ZS201605020306',
title: '家庭住户报警系统介绍',
description: '家庭住户报警系统介绍_电脑基础知识_IT/计算机_专业资料。精品文档第五章 家庭住户报警系统 1. 概述家庭自动化系统是适应现代生活对家庭功能逐渐增长的需求发展起来的...',
file: '家庭住户报警系统介绍.doc',
date: '2016-05-04 12:55',
}],
};
},
methods: {
handleEdit(index, row) {
console.log(index, row);
},
handleDelete(index, row) {
console.log(index, row);
},
handleClick(row) {
console.log(row);
},
},
};
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment