123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472 |
- <template>
- <div>
- <div class="d-flex flex-between">
- <div>
- </div>
- <el-form label-width="100px" :inline="true">
- <el-form-item prop="state_value">
- <el-select class="mr10" v-model="state_value" placeholder="请选择类别">
- <el-option v-for="item in type_list" :key="item.value" :label="item.label" :value="item.value" ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="keyword">
- <el-input placeholder="请输入搜索关键字" v-model="keyword" clearable @clear="getListData"></el-input>
- </el-form-item>
- <el-button type="primary" class="ml5" @click="getListData">搜索</el-button>
- <el-tooltip class="item" effect="dark" content="用户初次预览公文,需通过此按钮安转WPS预览组件。无组件支持,将出现不可预览公文情况。" placement="bottom-end">
- <el-button type="info" plain icon="el-icon-info" @click="initWpsAss" >wps组件初始化</el-button>
- </el-tooltip>
- </el-form>
- </div>
- <div v-if="false">
- <el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%" @selection-change="handleSelectionChange">
- <el-table-column type="selection" align="center" width="55"></el-table-column>
- <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
- <el-table-column label="类型" prop="lb_name" show-overflow-tooltip></el-table-column>
- <el-table-column label="标题" prop="gw_title" show-overflow-tooltip></el-table-column>
- <el-table-column label="发文字号" prop="gw_zh" show-overflow-tooltip></el-table-column>
- <el-table-column label="发起人" prop="gw_fqr_name" show-overflow-tooltip></el-table-column>
- <el-table-column label="发起科室" prop="gw_fqks_name" show-overflow-tooltip></el-table-column>
- <el-table-column label="发起时间" prop="create_dateline" show-overflow-tooltip></el-table-column>
- <el-table-column label="当前步骤" >
- <template slot-scope="scope">
- {{scope.row.gw_bz!='' ? scope.row.gw_bz : '--'}}
- </template>
- </el-table-column>
- <el-table-column label="当前审核人">
- <template slot-scope="scope">
- {{scope.row.gw_shr!='' ? scope.row.gw_shr : '--'}}
- </template>
- </el-table-column>
- <el-table-column label="状态" >
- <template slot-scope="scope">
- <div>{{scope.row.gw_status}}</div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="200">
- <template slot-scope="scope">
- <el-button type="text" v-if="scope.row.is_check=='0'" @click="handleCheck(scope.row)">审核</el-button>
- <el-button type="text" v-else @click="handleCheck(scope.row)">详情</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 可拖拉table -->
- <div class="sortAbleTable" >
- <el-table :data="tableData" row-key="gw_id" border style="width: 100%">
- <el-table-column type="selection" align="center" width="55"></el-table-column>
- <el-table-column type="index" label="序号" width="100" align="center" />
- <el-table-column
- v-for="(item, index) in colList"
- align="center"
- show-overflow-tooltip
- :key="`col_${index}`"
- :prop="dropCol[index].prop"
- :label="item.label"
- :min-width="item.minWidth"
- >
- <template v-slot="scope">
- <span v-if="dropCol[index].prop == 'date'" style="color: blue">
- {{ scope.row[dropCol[index].prop] }}
- </span>
- <span v-else-if="dropCol[index].prop == 'gw_status'" :class="scope.row.gw_status_option_k=='4' ? 'red' : (scope.row.gw_status_option_k=='5' ? 'green' : '')">
- {{ scope.row[dropCol[index].prop] }}
- </span>
- <span v-else>
- {{ scope.row[dropCol[index].prop] }}
- </span>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="130px">
- <template slot-scope="scope">
- <el-button type="text" v-if="scope.row.is_check=='0'" @click="handleCheck(scope.row)">审核</el-button>
- <el-button type="text" v-else @click="handleCheck(scope.row)">详情</el-button>
- <el-button type="text" @click="downloadFj(scope.row)" v-if="scope.row.gw_fj">下载附件</el-button>
- </template>
- </el-table-column>
- </el-table>
- <footer class="flex-item-none" style="display: flex; justify-content: flex-end; margin-top: 30px">
- <el-pagination background layout="total,prev, pager, next" :page-size="limit" :total="total"
- :current-page.sync="cur_page" @current-change="handleCurrentChange"></el-pagination>
- </footer>
- </div>
-
- </div>
- </template>
- <script>
- import { dbfw_list, org_users } from "./itemApi";
- import { useUserStore } from "@/stores/user";
- const { real_name, dept_ids } = useUserStore();
- import Sortable from 'sortablejs';
- import colDrap from "../../../utils/drag";
- import { getFullUrl } from "@/utils/helper";
- import { download, download2,download3} from "@/utils/request";
- export default {
- name: "bbtj",
- data() {
- return {
- state_value: "",
- keyword: "",
- type_list: [
- {
- label: '全部',
- value:'0'
- },
- {
- label: '待审核',
- value:'1'
- },
- {
- label: '已审核',
- value:'2'
- }
- ],
- tableData: [],
- type_value: "",
- multipleSelection:[],
- limit: 10,
- total: 0,
- cur_page: 1,
- yearData:[{
- value: '2016',
- label: '2016年'
- }, {
- value: '2017',
- label: '2017年'
- }, {
- value: '2018',
- label: '2018年'
- }, {
- value: '2019',
- label: '2019年'
- }, {
- value: '2020',
- label: '2020年'
- },{
- value: '2021',
- label: '2021年'
- }, {
- value: '2022',
- label: '2022年'
- }, {
- value: '2023',
- label: '2023年'
- }, {
- value: '2024',
- label: '2024年'
- }, {
- value: '2025',
- label: '2025年'
- }, {
- value: '2026',
- label: '2026年'
- }, {
- value: '2027',
- label: '2027年'
- }, {
- value: '2028',
- label: '2028年'
- }, {
- value: '2029',
- label: '2029年'
- }, {
- value: '2030',
- label: '2030年'
- }],
- dialogFormVisible: false,
- showType:[],
- dialogForm: {
- bbmc: '',
- year: '',
- valiType:[]
- },
- rules_check: {
- bbmc: [
- { required: true, message: '请输入报表名称', trigger: 'blur'}
- ],
- year: [
- { required: true, message: '请选择年份', trigger: 'change'}
- ],
- valiType: [
- { type: 'array', required: true, message: '请选择类型', trigger: 'change' }
- ]
- },
- title: "",
- isEdit: false,
- id: "",
- loading: false,
- userList: [],
- //动态列数组
- colList: [
- {
- label: "类型",
- prop: "lb_name",
- minWidth: 100,
- },
- {
- label: "标题",
- prop: "gw_title",
- minWidth: 100,
- },
- {
- label: "发文字号",
- prop: "gw_zh",
- minWidth: 100,
- },
- {
- label: "发起人",
- prop: "gw_fqr_name",
- minWidth: 100,
- },
- {
- label: "发起科室",
- prop: "gw_fqks_name",
- minWidth: 100,
- },
- {
- label: "发起时间",
- prop: "create_dateline",
- minWidth: 100,
- },
- {
- label: "当前步骤",
- prop: "gw_bz",
- minWidth: 100,
- },
- {
- label: "当前审核人",
- prop: "gw_shr",
- minWidth: 100,
- },
- {
- label: "状态",
- prop: "gw_status",
- minWidth: 100,
- },
- ],
- //拖拽列
- dropCol: [
- {
- label: "类型",
- prop: "lb_name",
- minWidth: 100,
- },
- {
- label: "标题",
- prop: "gw_title",
- minWidth: 100,
- },
- {
- label: "发文字号",
- prop: "gw_zh",
- minWidth: 100,
- },
- {
- label: "发起人",
- prop: "gw_fqr_name",
- minWidth: 100,
- },
- {
- label: "发起科室",
- prop: "gw_fqks_name",
- minWidth: 100,
- },
- {
- label: "发起时间",
- prop: "create_dateline",
- minWidth: 100,
- },
- {
- label: "当前步骤",
- prop: "gw_bz",
- minWidth: 100,
- },
- {
- label: "当前审核人",
- prop: "gw_shr",
- minWidth: 100,
- },
- {
- label: "状态",
- prop: "gw_status",
- minWidth: 100,
- },
- ],
- fileFinalArr:[],
- };
- },
- mounted() {
- this.getListData();
- this.dropCol = colDrap(this.dropCol);
- },
- methods: {
- //初始化列表数据
- getListData() {
- this.loading = true;
- let transObj = {
- page: this.cur_page,
- limit: this.limit,
- keyword: this.keyword,
- my_check:1,
- gw_status:this.state_value,
- };
- dbfw_list(transObj).then((res) => {
- this.loading = false;
- this.tableData = res.data.page_data;
- this.cur_page = Number(res.data.page_now);
- this.total = Number(res.data.total_rows);
- });
- },
- initWpsAss() {
- let installLink = window.globalVariables.installLink;
- window.open(installLink, '_blank');
- },
- //多选
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- //多选框选择
- handleCheckAllChange(val) {
- this.showType = val;
- this.dialogForm.valiType = val;
- },
- editData(item) {
- this.title = "编辑设置";
- this.isEdit = true;
- this.id = item.cbs_id;
- this.dialogForm.gzmc = item.cbs_name;
- this.dialogForm.sqr = item.cbs_sqr;
- this.dialogForm.cjsj = item.cbs_cjsj;
- this.dialogForm.yydx = item.cbs_yydx;
- this.dialogForm.btrqlx = item.cbs_btrqlx;
- this.dialogForm.btgzlx = item.cbs_btgzlx;
- this.dialogForm.zxbtsj = item.cbs_zxbtsj;
- this.dialogForm.btsjje = item.cbs_btsjje;
- this.dialogForm.shr = item.cbs_shr;
- this.dialogFormVisible = true;
- },
-
- delData(id) {
- let data = {
- cbs_id: id,
- };
- this.$confirm("确认删除该设置?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- shsz_del(data).then((res) => {
- if (res.code == 1) {
- this.$message({
- message: "删除成功!",
- type: "success",
- });
- this.getListData();
- } else {
- this.$message({
- message: res.msg,
- type: "error",
- });
- }
- });
- })
- .catch(() => { });
- },
- //翻页
- handleCurrentChange(val) {
- this.cur_page = val;
- this.getListData();
- },
- //待办发文-审核
- handleCheck(item) {
- let chooseID=item.gw_id;
- this.$router.push({ name: "gwglxt_dbfw_sh", params: { id: chooseID } });
- },
- //下载附件
- downloadFj(item) {
- let geFj=item.gw_fj
- if (geFj != '') {//字段有值
- let ifOneB = geFj.indexOf(";");
- if (ifOneB != '-1') {//能找到,不止一个附件
- let muilArr = geFj.split(';');
- let flileArr = []
- muilArr.forEach(item => {
- let secSpil = item.split('|');
- flileArr.push({
- fileUrl: getFullUrl(secSpil[0]),
- fileName: secSpil[1]
- })
- })
- this.fileFinalArr = flileArr;
- } else {//只有一个
- let singleArr = geFj.split('|');
- this.fileFinalArr = [{
- fileUrl: getFullUrl(singleArr[0]),
- fileName: singleArr[1]
- }];
- }
- } else {
- this.fileFinalArr = [];
- }
- if(this.fileFinalArr.length>1){
- console.log('附件有多个~');
- return
- }else{
- download3(this.fileFinalArr[0].fileUrl, '', this.fileFinalArr[0].fileName);
- }
-
- },
- handleDetail(item){
- console.log('111')
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .red {
- color: red;
- }
- .blue {
- color: #4351FF;
- }
- .green{
- color:green;
- }
- .time-type-list {
- width: 100%;
- border-bottom: 1px solid #f3f3f3;
- margin-bottom: 20px;
- display: flex;
- li {
- position: relative;
- top: 2px;
- cursor: pointer;
- width: 50px;
- font-size: 14px;
- line-height: 30px;
- text-align: center;
- &+li {
- margin-left: 20px;
- }
- &.selected {
- color: #265cd4;
- border-bottom: 2px solid #265cd4;
- }
- }
- }
- </style>
|