123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <template>
- <div class='tableZh'>
- <div class='tab-top' style='display:flex;'>
- <div class='picker-box'>
- <span class='picker-span'>日期:</span>
- <el-date-picker
- style='width:190px'
- v-model='dateVal'
- value-format='yyyyMMdd'
- type='daterange'
- @change='getZhjl'
- size='mini'
- range-separator='-'
- start-placeholder
- end-placeholder
- ></el-date-picker>
- </div>
- <Select
- @change='getZhjl'
- width='200'
- tipPlace='top'
- caption='政府部门:'
- size='small'
- v-model='searVal'
- style='margin-right:12px'
- v-if='department.length>0'
- :selectdata='department'
- :placeholder='"请选择"'
- ></Select>
- <el-input
- clearable
- placeholder='搜索记录事项'
- @keyup.enter.native='getZhjl'
- size='small'
- prefix-icon='el-icon-search'
- v-model='ssjlsx'
- style='width:200px'
- ></el-input>
- </div>
- <el-table
- border
- @row-click='handdle'
- v-loading='loading'
- :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
- :data='zhjlTable'
- style='width: 100%;margin-top:12px'
- >
- <el-table-column label='序号' type='index' width='60' :index='indexMethod'></el-table-column>
- <el-table-column prop sortable label='日期' width='100' resizable>
- <template slot-scope='{row}'>{{formatter(row.createdate)||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='政府部门' width='160'>
- <template slot-scope='{row}'>{{row.department||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='记录事项' :show-overflow-tooltip='true' min-width='700'>
- <template slot-scope='{row}'>{{row.recordsx||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='工作要求' width='160'>
- <template slot-scope='{row}'>{{row.workyq||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='整改要求' width='160'>
- <template slot-scope='{row}'>{{row.zgyq||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='附件' width='80'>
- <template slot-scope='{row}'>
- <div v-if='row.glsmsImage' style='cursor:pointer;color: #0091ff;' @click='clickPic(row.glsmsImage)'>{{row.glsmsImage.length+'张'}}</div>
- <!-- <div style='cursor:pointer;color: #0091ff;' @click='clickPic'>{{5+'张'}}</div> -->
- <div v-else>{{'--'}}</div>
- </template>
- </el-table-column>
- </el-table>
- <div class='foot'>
- <el-pagination
- background
- layout='prev, pager, next'
- :total='total'
- :page-size='size'
- @prev-click='pageChanged'
- @next-click='pageChanged'
- @current-change='pageChanged'
- ></el-pagination>
- <pic-large v-if='imgUrl.length>0' :imgUrl='imgUrl' ref='picLargeOpen'></pic-large>
- </div>
- </div>
- </template>
- <script>
- import moment from 'moment'
- import { Select } from 'meri-design'
- // import Select from '@/components/Select/Select.vue'
- import { queryGlams } from '@/api/other.js'
- import { querySelect } from '@/api/public.js'
- export default {
- data() {
- return {
- dateVal: '',
- loading: false,
- zhjlTable: [],
- searVal: '',
- total: 0,
- page: 1,
- size: 10,
- department: [],
- ssjlsx: '',
- isOpen: true,
- imgUrl: [],
- imgUrl2: [],
- imgUrls: [
- {
- name: '供电系统原理图.png',
- url:
- 'http://10.199.204.168:9080/doclinks/MANAGEINS/2020061921294136524467354%E4%BE%9B%E7%94%B5%E7%B3%BB%E7%BB%9F%E5%8E%9F%E7%90%86%E5%9B%BE.png'
- },
- {
- name: '供电系统原理图.pdf',
- url: 'http://10.199.204.168:9080/doclinks/MANAGEINS/2020061921260429024467352%E5%8C%BA%E4%BD%8D%E5%9B%BE.png'
- },
- {
- name: '供电系统原理图.html',
- url:
- 'http://10.199.204.168:9080/doclinks/MANAGEINS/2020061921294136524467354%E4%BE%9B%E7%94%B5%E7%B3%BB%E7%BB%9F%E5%8E%9F%E7%90%86%E5%9B%BE.png'
- }
- ]
- }
- },
- components: { Select },
- methods: {
- clickPic() {
- this.imgUrl = []
- this.imgUrl2 = []
- var patternFileExtension = /\.([0-9a-z]+)(?:[\?#]|$)/i
- if (this.imgUrls.length > 0) {
- this.imgUrls.forEach(el => {
- let name = el.name.match(patternFileExtension)[1]
- let obj = {
- name: el.name,
- url: el.url,
- type: name
- }
- this.imgUrl.push(obj)
- })
- }
- console.log(this.imgUrl)
- // var fileExtension = '供电系统原理图.html'.match(patternFileExtension)
- // console.log(fileExtension[1])
- if (this.imgUrl.length > 0) {
- this.$refs.picLargeOpen.open()
- }
- },
- formatter(date) {
- return moment.unix(date / 1000).format('YYYY.MM.DD')
- },
- rowClick() {},
- changeData(val) {
- //console.log(val)
- },
- indexMethod(index) {
- return (this.page - 1) * this.size + index + 1
- },
- // 综合记录
- getZhjl() {
- let getParams = {
- plazaId: this.$store.state.plazaId,
- page: this.page,
- size: this.size,
- orderBy: 'createdate,0'
- }
- if (this.searVal) {
- getParams.department = this.searVal
- }
- if (this.ssjlsx) {
- getParams.keyword = `${this.ssjlsx}:recordsx`
- }
- if (this.dateVal) {
- getParams.createdateStartDate = this.dateVal[0] + '000000'
- getParams.createdateEndDate = this.dateVal[1] + '000000'
- }
- queryGlams({ getParams }).then(res => {
- if (res.result == 'success') {
- this.loading = false
- this.total = res.count
- this.zhjlTable = res.data ? res.data : []
- }
- //console.log('综合记录', res)
- })
- },
- pageChanged(page) {
- this.page = page
- this.getZhjl()
- },
- changeSelect() {
- this.department = []
- let postParams = [
- {
- columnName: { department: 'department' },
- tableName: 'sms_zhsxjl'
- }
- ]
- let data = {
- plazaId: this.$store.state.plazaId
- }
- querySelect({ data, postParams }).then(res => {
- //console.log('政府部门', res)
- let department = []
- department = res.data.data.sms_zhsxjl.department ? res.data.data.sms_zhsxjl.department : []
- if (department.length > 0) {
- department.forEach(el => {
- let obj = {
- id: el.key,
- name: el.value
- }
- this.department.push(obj)
- })
- //console.log(this.department)
- }
- })
- },
- handdle() {
- if (this.isOpen) {
- // window.open('http://bing.com', true)
- }
- }
- },
- mounted() {},
- created() {
- this.changeSelect()
- }
- }
- </script>
- <style lang="less" scoped>
- .tableZh {
- .picker-box {
- display: flex;
- align-items: center;
- background: #fff;
- padding: 0 6px;
- border: 1px solid #dcdfe6;
- border-radius: 4px;
- height: 32px;
- box-sizing: border-box;
- margin-right: 12px;
- .picker-span {
- margin-right: 6px;
- color: rgba(0, 0, 0, 0.65);
- }
- }
- .fileOpen {
- color: rgba(0, 145, 255, 1);
- cursor: pointer;
- }
- }
- </style>
- <style lang="less">
- .tableZh {
- .foot {
- height: 32px;
- display: flex;
- justify-content: flex-end;
- margin-top: 28px;
- }
- .picker-box {
- .el-input__inner {
- border: none;
- }
- }
- .el-range-editor.el-input__inner {
- padding: 3px 0px;
- }
- .el-icon-date {
- display: none;
- }
- .el-range__close-icon {
- position: absolute;
- right: 0px;
- top: 2px;
- }
- .el-range-editor--mini .el-range-input {
- font-size: 14px;
- color: rgb(31, 36, 41);
- }
- }
- </style>
|