123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799 |
- <template>
- <div>
- <ag-grid-layout
- toolbar
- :table-height="tableHeight"
- theme="ag-theme-alpine"
- :column-defs="columnDefs"
- :row-data="rowData"
- :locale-text="localeText"
- :grid-options="gridOptions"
- :default-col-def="defaultColDef"
- :animate-rows="true"
- :row-selection="rowSelection"
- :enable-cell-change-flash="true"
- @filterChanged="filterModifed"
- @sortChanged="gridSortChange"
- >
- <!-- @rowDoubleClicked="getList"-->
- <div slot="toolbar" class="inner-toolbar">
- <div class="toolbar-search">
- <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
- </div>
- <div class="toolbar-btns">
- <el-button type="primary" size="mini" @click="createScreenTip">{{ this.$t('screenTip.tipAdd') }}</el-button>
- </div>
- </div>
- <el-pagination
- v-if="pageData"
- slot="pagination"
- :current-page="pageData.page_no"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="pageData.page_size"
- layout="total, sizes, prev, pager, next, jumper"
- :total="pageData.data_total"
- @size-change="handlePageSizeChange"
- @current-change="handlePageCurrentChange"
- />
- </ag-grid-layout>
- <el-dialog :title.sync="formtitle" :visible.sync="formshow" width="35%">
- <div>
- <el-form ref="editform" :rules="rules" label-width="120px" :model="formmodel">
- <el-row>
- <el-col :span="24">
- <el-form-item :label="this.$t('screenTip.showText')" prop="show_text">
- <el-input
- v-model="formmodel.show_text"
- clearable
- :maxlength="100"
- :placeholder="this.$t('screenTip.showText')"
- />
- </el-form-item>
- <el-form-item :label="this.$t('screenTip.textColor')">
- <el-input :placeholder="this.$t('screenTip.textColor')" v-model="formmodel.text_color">
- <el-color-picker slot="append" color-format="hex" v-model="formmodel.text_color" size="mini"></el-color-picker>
- </el-input>
- </el-form-item>
- <el-form-item prop="text_size" :label="this.$t('screenTip.textSize')">
- <el-input v-model.number="formmodel.text_size" :placeholder="this.$t('screenTip.textSize')"><span slot="append">dp</span></el-input>
- </el-form-item>
- <el-form-item :label="this.$t('screenTip.screenBgColor')">
- <el-input :placeholder="this.$t('screenTip.screenBgColor')" v-model="formmodel.screen_bg_color">
- <el-color-picker slot="append" color-format="hex" v-model="formmodel.screen_bg_color" size="mini"></el-color-picker>
- </el-input>
- </el-form-item>
- <el-form-item prop="display_minutes" :label="this.$t('screenTip.displayLongest')">
- <el-input v-model.number="formmodel.display_minutes" :placeholder="this.$t('screenTip.displayLongest')"><span slot="append">{{this.$t('action.minute2')}}</span></el-input>
- </el-form-item>
- <el-form-item prop="bool_scroll" >
- <el-checkbox v-model="formmodel.bool_scroll" @change="scrollChange">{{this.$t('screenTip.boolScroll')}}</el-checkbox>
- </el-form-item>
- <el-form-item :label="this.$t('screenTip.scrollDirect')" prop="scroll_direct">
- <el-select v-model="formmodel.scroll_direct"
- :placeholder="this.$t('screenTip.scrollDirect')"
- filterable clearable >
- <el-option v-for="(item,index) in animateRender" :key="index" :label="item.key" :value="item.value" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
- <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
- </div>
- </el-dialog>
- <!-- <el-dialog :title.sync="subscribeTitle" :visible.sync="formSubscribe" width="50%">-->
- <!-- <div>-->
- <!-- <fieldset v-for="(item,index) in channelSubscribers" v-if="item.roleName!=='管理员'" :key="index" style="margin-top: 10px">-->
- <!-- <legend><span style="margin-right: 10px">{{ item.roleName }} </span><el-checkbox v-model="item.allCkeck" style="float: right;" :indeterminate="item.indeterminate" @change="(checked)=>{handleCheckAll(checked,item)}">{{ choiceAll }}</el-checkbox></legend>-->
- <!-- <el-row :gutter="20" type="flex" style="padding: 10px">-->
- <!-- <el-col :span="24">-->
- <!-- <el-checkbox v-for="(clerk,_index) in item.clerks" :key="_index" v-model="clerk.checked" @change="handleCheckboxChanged(item)">{{ clerk.clerk_name }}</el-checkbox>-->
- <!-- </el-col>-->
- <!-- </el-row>-->
- <!-- </fieldset>-->
- <!-- </div>-->
- <!-- <div slot="footer" class="dialog-footer">-->
- <!-- <el-button @click="formSubscribe = false">{{ this.$t('action.cancel') }}</el-button>-->
- <!-- <el-button type="primary" @click="handlerSubscribeSubmit">{{ this.$t('action.yes') }}</el-button>-->
- <!-- </div>-->
- <!-- </el-dialog>-->
- </div>
- </template>
- <script>
- import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
- import ButtonCellRender from '../../components/AgGridCellRender/ButtonCellRender'
- import * as API_ScreenTip from '@/api/ncs_screentip'
- import { unix2Date } from '@/utils/Foundation'
- import * as API_Clerk from '@/api/ncs_clerk'
- import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
- import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
- import ButtonCellRenderList from "@/components/AgGridCellRender/ButtonCellRenderList";
- export default {
- name: "index",
- components: { ButtonCellRenderList, ButtonCellRender, ListFilter, RadioFilter },
- data() {
- return {
- tableData: [],
- /** 列表参数 */
- params: {
- page_size: 20,
- page_no: 1,
- fixedCondition: ' part_id = ' + this.$store.getters.partId
- },
- /** 新建组织弹出参数 **/
- formtitle: this.$t('screenTip.tipAdd'),
- formshow: false,
- /** 频道订阅设置 */
- // formSubscribe: false,
- formmodel: {},
- // frameGroups: [],
- rules: {
- show_text: [
- { required: true, message: this.$t('screenTip.showTextRequired'), trigger: 'blur' }
- ],
- scroll_direct:[{ required: false, message: this.$t('screenTip.scrollDirectRequired'), trigger: 'blur' }],
- display_minutes:[{ required: true, message: this.$t('screenTip.displayMinutesRequired'), trigger: 'blur' },{ type: 'number', message: this.$t('screenTip.numberRequired')}],
- text_size:[{ required: true, message: this.$t('screenTip.textSizeRequired'), trigger: 'blur' },{ type: 'number', message: this.$t('screenTip.numberRequired')}]
- },
- // timeRange: [new Date(2020, 11, 11, 7, 0), new Date(2020, 11, 11, 8, 0)],
- // checkWeek: [],
- /** ag-grid参数 **/
- pageData: [],
- loading: false,
- errorId: null,
- shopVisible: false,
- columnDefs: null,
- rowData: null,
- defaultColDef: null,
- gridOptions: null,
- gridApi: null,
- columnApi: null,
- localeText: AG_GRID_LOCALE_CN,
- filterState: null,
- rowSelection: null,
- frameworkComponents: null,
- /** 频道订阅者情况数组 */
- // channelSubscribers: [],
- // subscribeTitle: '',
- choiceAll: this.$t('action.choiceAll'),
- booleanRender: [
- { key: this.$t('entraceguardUser.yes'), value: true, color: 'green' },
- { key: this.$t('entraceguardUser.nop'), value: false, color: 'red' }
- ],
- animateRender:[
- {key:this.$t('screenTip.leftToRight'),value:1},
- {key:this.$t('screenTip.rightToLeft'),value:2},
- {key:this.$t('screenTip.upToDown'),value:3},
- {key:this.$t('screenTip.downToUp'),value:4}
- ]
- }
- },
- computed: {
- tableHeight() {
- return this.mainAreaHeight - 130
- }
- },
- beforeMount() {
- this.gridOptions = {}
- this.columnDefs = [
- {
- headerName: '#',
- headerCheckboxSelection: true,
- headerCheckboxSelectionFilteredOnly: true,
- checkboxSelection: true,
- sortable: false, filter: false,
- width: 100,
- resizable: false,
- valueGetter: this.hashValueGetter
- },
- { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 130 },
- {
- headerName: this.$t('screenTip.showText'), field: 'show_text', sortable: true, filter: 'agTextColumnFilter', flex: 1,
- cellRenderer: (para) => {
- return this.textShow(para)
- }
- },
- {
- headerName: this.$t('screenTip.textColor'), field: 'text_color', sortable: true, filter: 'agTextColumnFilter', width: 130,
- cellRenderer: (para) => {
- return this.colorFormatter(para)
- }
- },
- {
- headerName: this.$t('screenTip.textSize'), field: 'text_size', sortable: true, filter: 'agNumberColumnFilter', width: 130
- },
- {
- headerName: this.$t('screenTip.screenBgColor'), field: 'screen_bg_color', sortable: true, filter: 'agTextColumnFilter', width: 130,
- cellRenderer: (para) => {
- return this.colorFormatter(para)
- }
- },
- {
- headerName: this.$t('screenTip.displayMinutes'), field: 'display_minutes', sortable: true, filter: 'agNumberColumnFilter', width: 180
- },
- {
- headerName: this.$t('screenTip.boolScroll'), field: 'bool_scroll', sortable: true, filterFramework: 'RadioFilter', filterParams: {
- listData: this.booleanRender
- }, width: 150,
- cellRenderer: (para) => {
- return this.radioFilterFormatter(para, this.booleanRender)
- }
- },
- {
- headerName: this.$t('screenTip.scrollDirect'), field: 'scroll_direct', sortable: true, filterFramework: 'ListFilter', filterParams: {
- listData: this.animateRender
- }, width: 150,
- cellRenderer: (para) => {
- return this.scrollDirectFormatter(para, this.animateRender)
- }
- },
- // {
- // headerName: this.$t('screenTip.boolScroll'), field: 'bool_scroll', sortable: true, filter: 'agTextColumnFilter', width: 130
- // },
- // lockPosition 锁定位置,会在第一列
- // lockPinned = true 不能拖动然后固定
- // resizeable 单元个大小是否可以调整
- { headerName: this.$t('action.handle'), field: 'id',
- cellRendererFramework: 'ButtonCellRenderList',
- cellRendererParams: param => {
- return {
- list: [
- {
- onClick: this.handleEdit,
- label: this.$t('action.edit'),
- buttonType: 'primary',
- buttonSize: 'mini'
- },
- // {
- // onClick: this.manageSubscribe,
- // label: this.$t('channel.subscribeManage'),
- // buttonType: 'warning',
- // buttonSize: 'mini',
- // },
- // {
- // onClick: this.channelImHistory,
- // label: this.$t('channel.channelImHistory'),
- // buttonType: 'success',
- // buttonSize: 'mini',
- // },
- {
- onClick: this.deleteSingle,
- label: this.$t('action.delete'),
- buttonType: 'danger',
- buttonSize: 'mini',
- }
- ]}
- },
- filter: false,
- pinned: 'right',
- lockPinned: true,
- minWidth: this.$i18n.locale === 'zh' ? 200 : 300,
- resizable: false,
- sortable: false
- }
- // {
- // headerName: this.$t('action.edit'), field: 'id',
- // cellRendererFramework: 'ButtonCellRender',
- // cellRendererParams: {
- // onClick: this.handEdit,
- // label: this.$t('action.edit'),
- // buttonType: 'primary',
- // buttonSize: 'mini'
- // },
- // filter: false,
- // pinned: 'right',
- // lockPinned: true,
- // width: 100,
- // resizable: false,
- // sortable: false
- // },
- //
- // {
- // headerName: this.$t('channel.subscribeManage'), field: 'id',
- // cellRendererFramework: 'ButtonCellRender',
- // cellRendererParams: {
- // onClick: this.manageSubscribe,
- // label: this.$t('channel.subscribeManage'),
- // buttonType: 'success',
- // buttonSize: 'mini'
- // },
- // filter: false,
- // pinned: 'right',
- // lockPinned: true,
- // width: 100,
- // resizable: false,
- // sortable: false
- // },
- //
- // {
- // headerName: "留言历史", field: 'id',
- // cellRendererFramework: 'ButtonCellRender',
- // cellRendererParams: {
- // onClick: this.channelImHistory,
- // label: "留言历史",
- // buttonType: 'success',
- // buttonSize: 'mini'
- // },
- // filter: false,
- // pinned: 'right',
- // lockPinned: true,
- // width: 100,
- // resizable: false,
- // sortable: false
- // },
- //
- // {
- // headerName: this.$t('action.delete'), field: 'id',
- // cellRendererFramework: 'ButtonCellRender',
- // cellRendererParams: param => {
- // return {
- // onClick: this.deleteSingle,
- // label: this.$t('action.delete'),
- // buttonType: 'danger',
- // buttonSize: 'mini'
- // }
- // },
- // pinned: 'right',
- // lockPinned: true,
- // width: 100,
- // resizable: false,
- // filter: false,
- // sortable: false
- // }
- ]
- this.defaultColDef = {
- sortable: true,
- resizable: true,
- comparator: this.dateCustomComparator,
- filterParams: {
- debounceMs: 200,
- newRowsAction: 'keep',
- textCustomComparator: this.textCustomComparator,
- comparator: this.dateCustomComparator
- }
- }
- this.rowSelection = 'multiple'
- },
- mounted() {
- window.onresize = this.windowResize
- this.gridApi = this.gridOptions.api
- this.gridColumnApi = this.gridOptions.columnApi
- // 设置默认排序字段,应用列状态之后会触发 gridSortChange 函数,会调用getlist,后面不需要再调用this.getlist
- this.gridColumnApi.applyColumnState({
- state: [
- {
- colId: 'id',
- sort: 'asc'
- }
- ]
- })
- // this.getEmployees()
- },
- methods: {
- windowResize() {
- this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
- },
- handlerDelete(ids) {
- this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
- confirmButtonText: this.$t('action.yes'),
- cancelButtonText: this.$t('action.cancel'),
- type: 'warning'
- }).then(() => {
- API_ScreenTip.remove(ids).then(
- response => {
- this.getList()
- this.$message({
- type: 'success',
- message: this.$t('action.deleted')
- })
- }
- ).catch(response => {
- this.$message({
- type: 'info',
- message: response.message
- })
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: this.$t('action.cancelDelete')
- })
- })
- },
- deleteSingle(row) {
- this.handlerDelete(row.id)
- },
- /**
- * 创建频道
- */
- createScreenTip() {
- this.formshow = true
- this.formmodel = {
- text_color: '#FFFFFF',
- screen_bg_color:'#409EFF',
- part_id: this.$store.getters.partId
- }
- },
- /** 分页大小发生改变 */
- handlePageSizeChange(size) {
- this.params.page_size = size
- this.getList()
- },
- /** 分页页数发生改变 */
- handlePageCurrentChange(page) {
- this.params.page_no = page
- this.getList()
- },
- /** 加载列表数据 */
- getList() {
- this.loading = true
- const param = this.MixinClone(this.params)
- this.gridApi.showLoadingOverlay()
- API_ScreenTip.getList(param).then(response => {
- this.loading = false
- // this.tableData = [...response.data]
- this.pageData = {
- page_no: response.page_no,
- page_size: response.page_size,
- data_total: response.data_total
- }
- this.$nextTick(() => {
- const node = this.gridApi.getDisplayedRowAtIndex(0)
- if (node !== null && node !== undefined) {
- node.setSelected(true)
- }
- })
- this.rowData = [...response.data]
- this.refreshPlayStatus()
- }).catch(() => {
- this.loading = false
- })
- },
- /** 处理搜索 */
- handlerSearch(keywords) {
- this.params.query = keywords
- this.getList()
- },
- /** 处理字段排序 */
- tableSort(column) {
- if (column.order !== null) {
- this.params.sort = column.prop
- this.params.dir = column.order === 'ascending' ? 'asc' : 'desc'
- } else {
- this.params.sort = null
- this.params.dir = null
- }
- this.getList()
- },
- /**
- * 格式化unix时间戳
- **/
- unixDateFormatter(param) {
- if (!param.value) return ''
- return unix2Date(param.value * 1000)
- },
- gridSortChange(param) {
- const columnState = param.columnApi.getColumnState()
- // 排序状态
- const sortState = columnState.filter(function(s) {
- return s.sort != null
- }).map(function(s) {
- return {
- colId: s.colId,
- sort: s.sort,
- sortIndex: s.sortIndex
- }
- }).sort(function(a, b) {
- return a.sortIndex - b.sortIndex
- })
- if (sortState.length > 0) {
- if (sortState.length === 1) {
- this.params.sort = sortState[0].colId
- this.params.dir = sortState[0].sort
- } else {
- let sortstring = ''
- sortState.forEach(function(item) {
- sortstring += item.colId + ' ' + item.sort + ','
- })
- this.params.sort = sortstring.substring(0, sortstring.length - 1)
- this.params.dir = ' '
- }
- } else {
- delete this.params.sort
- delete this.params.dir
- }
- this.getList()
- },
- filterModifed(param) { // todo 通过转换后的数值过滤,需要转回原始数值
- var model = param.api.getFilterModel()
- this.params.filter = JSON.stringify(model)
- this.getList()
- },
- handleEdit(row) {
- this.formmodel = {
- ...row
- }
- this.formtitle=this.$t('screenTip.tipEdit')
- this.formshow = true
- },
- /**
- * 提交新增表单
- * @param formname
- */
- handlerFormSubmit(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- if (!this.formmodel.id) {
- /** 新增 */
- this.formmodel.part_id = this.$store.getters.partId
- API_ScreenTip.add(this.formmodel).then(() => {
- this.formshow = false
- this.$message.success(this.$t('action.addSuccess'))
- this.getList()
- })
- } else {
- API_ScreenTip.update(this.formmodel.id, this.formmodel).then(() => {
- this.formshow = false
- this.$message.success(this.$t('action.editSuccess'))
- this.getList()
- })
- }
- } else {
- this.$message.error(this.$t('action.fromError'))
- }
- })
- },
- radioFilterFormatter(params, array) {
- const item = array.filter(p => p.value === params.value)[0]
- if (item) {
- if (item.color) {
- return '<span style="color:' + item.color + '">' + item.key + '</span>'
- } else {
- return item.key
- }
- } else {
- return ''
- }
- },
- scrollDirectFormatter(params,array){
- const item = array.filter(p => p.value === params.value)[0]
- if (item) {
- return item.key
- } else {
- return ''
- }
- },
- colorFormatter(params){
- return '<div style="background:' + params.value+ ';width:100%;height: 100%;"></div>'
- },
- textShow(params){
- console.log('pms',params)
- return '<div style="background:' + params.data.screen_bg_color+ ';color:'+params.data.text_color+';width:100%;height: 100%;overflow: hidden;text-align: center;"><div class="'+(params.data.bool_scroll?('animate'+params.data.scroll_direct):'')+'">'+params.value+'</div></div>'
- },
- scrollChange(val){
- this.rules.scroll_direct[0].required=val
- },
- // handlerSubscribeSubmit() {
- // let subscribeIds = []
- // this.channelSubscribers.forEach(item => {
- // subscribeIds = [...item.clerks.filter(p => p.checked).map(p => p.member_id), ...subscribeIds]
- // })
- // API_ScreenTip.setChannelSubscribers({ channel_id: this.formmodel.id, member_ids: subscribeIds.length === 0 ? null : [...subscribeIds] }).then(() => {
- // this.formSubscribe = false
- // this.$message.success(this.$t('action.editSuccess'))
- // })
- // },
- // manageSubscribe(row) {
- // this.formmodel = { ...row }
- // API_ScreenTip.getChannelSubscribers(row.id).then(res => {
- // this.channelSubscribers.forEach(item => {
- // item.clerks.map(k => {
- // k.checked = res.map(p => p.member_id).includes(k.member_id)
- // return k
- // })
- // const checkedLength = item.clerks.filter(p => p.checked).length
- // this.$set(item, 'allCkeck', item.clerks.length === checkedLength)
- // this.$set(item, 'indeterminate', (checkedLength !== 0) && (item.clerks.length !== checkedLength))
- // })
- // })
- // this.subscribeTitle = row.channel_name + this.$t('channel.subscribeManage')
- // this.formSubscribe = true
- // },
- // channelImHistory(row) {
- // this.$router.push({ name: 'channelImHistory', params: { id: row.id, callback: this.getList() }})
- // },
- // getEmployees() {
- // const _this = this
- // _this.nurses = []
- // API_Clerk.listByPartRoleId({ partId: this.$store.getters.partId }).then(res => {
- // _this.clerks = res
- // const groupBy = (arr, func) =>
- // arr.map(typeof func === 'function' ? func : val => val[func]).reduce((acc, val, i) => {
- // acc[val] = (acc[val] || []).concat(arr[i])
- // return acc
- // }, {})
- // const groupData = groupBy(res, item => item.role_name)
- // _this.nurses = Object.entries(groupData)
- //
- // _this.nurses.forEach(item => {
- // this.channelSubscribers.push({ 'roleName': item[0], 'clerks': item[1].map(i => { return { ...i, 'checked': false } }), 'allCheck': false, 'indeterminate': false })
- // })
- //
- // })
- // },
- handleCheckboxChanged(item) {
- this.countAllRole(item)
- },
- /** 计算传入角色组的选择情况 */
- countAllRole(role) {
- const _list = []
- if (!Array.isArray(role)) {
- if (role.clerks) _list.push(...this.countAllRole(role.clerks))
- } else {
- role.forEach(item => {
- _list.push(item)
- })
- }
- const length = _list.length
- const length_checked = _list.filter(_item => _item.checked).length
- this.$set(role, 'allCkeck', length === _list.filter(_item => _item.checked).length)
- this.$set(role, 'indeterminate', (length_checked !== 0) && (length !== length_checked))
- return _list
- },
- handleCheckAll(checked, item) {
- this.$set(item, 'indeterminate', false)
- this.setFrameCheck(item, checked)
- },
- /** 设置选择状态 */
- setFrameCheck(item, checked) {
- const perm = this.MixinClone(item)
- if (!Array.isArray(perm)) {
- this.$set(item, 'checked', checked)
- if (item.clerks && item.clerks.length) {
- this.$set(item, 'clerks', this.setFrameCheck(item.clerks, checked))
- }
- } else {
- perm.map(item => {
- item.checked = checked
- this.$set(item, 'checked', checked)
- if (item.clerks && item.clerks.length) {
- this.$set(item, 'clerks', this.setFrameCheck(item.clerks, checked))
- }
- })
- }
- return perm
- }
- }
- }
- </script>
- <style >
- .animate1 {
- white-space: nowrap;
- animation: 10s wordsLoop1 linear infinite normal;
- }
- .animate2 {
- white-space: nowrap;
- animation: 10s wordsLoop2 linear infinite normal;
- }
- .animate3 {
- white-space: nowrap;
- animation: 10s wordsLoop3 linear infinite normal;
- }
- .animate4 {
- white-space: nowrap;
- animation: 10s wordsLoop4 linear infinite normal;
- }
- @keyframes wordsLoop1 {
- 0% {
- transform: translateX(-100%);
- -webkit-transform: translateX(-100%);
- }
- 100% {
- transform: translateX(100%);
- -webkit-transform: translateX(100%);
- }
- }
- @-webkit-keyframes wordsLoop1 {
- 0% {
- transform: translateX(-100%);
- -webkit-transform: translateX(-100%);
- }
- 100% {
- transform: translateX(100%);
- -webkit-transform: translateX(100%);
- }
- }
- @keyframes wordsLoop2 {
- 0% {
- transform: translateX(100%);
- -webkit-transform: translateX(100%);
- }
- 100% {
- transform: translateX(-100%);
- -webkit-transform: translateX(-100%);
- }
- }
- @-webkit-keyframes wordsLoop2 {
- 0% {
- transform: translateX(100%);
- -webkit-transform: translateX(100%);
- }
- 100% {
- transform: translateX(-100%);
- -webkit-transform: translateX(-100%);
- }
- }
- @keyframes wordsLoop4 {
- 0% {
- transform: translateY(100%);
- -webkit-transform: translateY(100%);
- }
- 100% {
- transform: translateY(-100%);
- -webkit-transform: translateY(-100%);
- }
- }
- @-webkit-keyframes wordsLoop4 {
- 0% {
- transform: translateY(100%);
- -webkit-transform: translateY(100%);
- }
- 100% {
- transform: translateY(-100%);
- -webkit-transform: translateY(-100%);
- }
- }
- @keyframes wordsLoop3 {
- 0% {
- transform: translateY(-100%);
- -webkit-transform: translateY(-100%);
- }
- 100% {
- transform: translateY(100%);
- -webkit-transform: translateY(100%);
- }
- }
- @-webkit-keyframes wordsLoop3 {
- 0% {
- transform: translateY(-100%);
- -webkit-transform: translateY(-100%);
- }
- 100% {
- transform: translateY(100%);
- -webkit-transform: translateY(100%);
- }
- }
- </style>
|