123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650 |
- <template>
- <fullscreen :fullscreen.sync="fullscreen" class="container">
- <div class="container-box">
- <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
- <div class="search">
- <el-select v-model="advstatus" @change="advchange">
- <el-option v-for="items in advopt" :key="items.id" :label="items.name" :value="items.id">
- </el-option>
- </el-select>
- </div>
- <div class="tabbox">
- <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
- tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
- <el-table-column prop="process_id" label="工单编号">
- </el-table-column>
- <el-table-column prop="need_name" label="工单标题"> </el-table-column>
- <el-table-column prop="createId" label="发起人"> </el-table-column>
- <el-table-column prop="proposer" label="发起人姓名">
- </el-table-column>
- <el-table-column prop="proposer_time" label="发起时间">
- </el-table-column>
- <el-table-column prop="taskName" label="状态"> </el-table-column>
- <el-table-column label="操作" width="120px" align="center">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" @click="dialogCheck(scope.row, 1)">查看</el-button>
- <!--<el-button size="mini" type="danger" v-if="scope.row.sts==3"-->
- <el-button size="mini" v-if="scope.row.status === '1'" type="danger" @click="dialogCheck(scope.row, 2)">审核
- </el-button>
- <!-- <el-button
- v-if="
- userInfo.loginName == scope.row.opName && scope.row.sts == '3'
- "
- size="mini"
- type="primary"
- @click="advSure(scope.row)"
- >归档
- </el-button> -->
- </template>
- </el-table-column>
- </el-table>
- <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
- :total="total">
- </el-pagination>
- </div>
- <el-dialog title="广告管理" v-if="dialogStatus" :visible.sync="dialogStatus" width="80%" :destroy-on-close="true"
- :modal-append-to-body="false" :close-on-click-modal="false">
- <div>
- <advert
- v-if="typestatsu === 2"
- @closeEdio="closeEdio"
- :draftStatus="draftStatus"
- :componentInfo="componentInfo"
- :componentStatus="componentStatus"
- :changeinfo="changeinfo"
- ></advert>
- </div>
- </el-dialog>
- <el-dialog title="定稿素材" :visible.sync="dialogStatusc" width="50%" :destroy-on-close="true"
- :modal-append-to-body="false" :close-on-click-modal="false">
- <!-- <el-form>
- <el-form-item class="info-line online">
- <span>素材类型</span>
- <el-select :popper-append-to-body="false" v-model="advtype" placeholder="素材类型">
- <el-option v-for="item in typeList" :key="item.dataCode" :label="item.dataName"
- :value="item.dataCode">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form> -->
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogCli(1)" type="primary">确 定</el-button>
- <el-button @click="dialogCli(2)">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </fullscreen>
- </template>
- <script>
- import {
- getTodoBase,
- getDoneBase,
- getInitiateBase,
- } from "../../../http/api.js";
- import mySearch from "../../../components/search.vue";
- import toolList from "../../../components/toolList.vue";
- import advert from "./components/adverts.vue";
- export default {
- components: {
- mySearch,
- toolList,
- advert,
- },
- data() {
- return {
- draftStatus:true,
- clickStatus:"",
- tooltit: "广告管理",
- auditStatus: false,
- fullscreen: false,
- total: 0,
- pageSize: 1,
- tableData: [{}],
- dialogStatus: false,
- disableStatus: false,
- infolist: {},
- userInfo: {},
- params: {},
- typestatsu: 1,
- options: [],
- typeopt: [],
- componentInfo: {},
- componentStatus: false,
- dialogStatusc: false,
- loading: false,
- changeinfo: false,
- saveStatus: false,
- advstatus: "",
- advopt: [
- {
- id: "0",
- name: "待审批",
- },
- {
- id: "1",
- name: "已审批",
- },
- {
- id: "2",
- name: "我发起的",
- },
- {
- id: "3",
- name: "定稿 ",
- },
- ],
- btnctrlStatus: false,
- typeList: [],
- advtype: "",
- dgid: "",
- singleTable: {},
- shParam: {},
- // isBtnShow: false,
- isGDClick: false,
- tableName: "ggsj_process",
- };
- },
- methods: {
- //我的待办
- getQueryList() {
- let list = {
- tableName: this.tableName,
- };
- getTodoBase(this.pageSize, "", list).then((res) => {
- this.tableData = res.data.data;
- this.tableData.map((item) => {
- item.status = "1";
- });
- this.total = res.data.totalRecord;
- this.loading = false;
- });
- // console.log(this.$utilflow);
- // let res = this.$utilflow.getQueryList()
- // console.log(res);
- // this.$http({
- // url: "/market/waf/queryTodoBase",
- // method: "post",
- // headers: {
- // "Content-Type": "application/json",
- // page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
- // },
- // data: { tableName: this.tableName },
- // }).then((res) => {
- // // console.log(res);
- // this.tableData = res.data.data;
- // // let data = res.data.list;
- // this.tableData.map((item) => {
- // // status === 1 需要审核
- // item.status = "1";
- // });
- // console.log(this.tableData);
- // this.total = res.data.totalRecord;
- // this.loading = false;
- // // this.isGDClick = false;
- // // if(this.advstatus==0){
- // // data.forEach(item => {
- // // item.isBtnShow = false;
- // // this.getSts(item)
- // // });
- // // }
- // // this.tableData = data;
- // });
- },
- //我的已办
- getQueryDone() {
- let list = {
- tableName: this.tableName,
- };
- getDoneBase(this.pageSize, "", list).then((res) => {
- this.tableData = res.data.data;
- this.tableData.map((item) => {
- item.status = "2";
- });
- this.total = res.data.totalRecord;
- this.loading = false;
- });
- // this.$http({
- // url: "/market/waf/queryDoneBase",
- // method: "post",
- // headers: {
- // "Content-Type": "application/json",
- // page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
- // },
- // data: { tableName: this.tableName },
- // }).then((res) => {
- // console.log(res);
- // this.tableData = res.data.data;
- // // let data = res.data.list;
- // this.tableData.map((item) => {
- // // status === 2 不需要审核
- // item.status = "2";
- // });
- // this.total = res.data.totalRecord;
- // this.loading = false;
- // // this.isGDClick = false;
- // // if(this.advstatus==0){
- // // data.forEach(item => {
- // // item.isBtnShow = false;
- // // this.getSts(item)
- // // });
- // // }
- // // this.tableData = data;
- // });
- },
- //我发起的
- getMeLaunch() {
- let list = {
- tableName: this.tableName,
- };
- getInitiateBase(this.pageSize, "", list).then((res) => {
- this.tableData = res.data.data;
- this.tableData.map((item) => {
- if (item.taskName === "起草") {
- item.status = "1";
- } else {
- item.status = "2";
- }
- });
- this.total = res.data.totalRecord;
- this.loading = false;
- });
- // this.$http({
- // url: "/market/waf/queryInitiateBase",
- // method: "post",
- // headers: {
- // "Content-Type": "application/json",
- // page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
- // },
- // data: { tableName: this.tableName },
- // }).then((res) => {
- // // let size = this.isNaNStatus(res.data);
- // this.tableData = res.data.data;
- // this.tableData.map((item) => {
- // if (item.taskName === "起草") {
- // item.status = "1";
- // } else {
- // item.status = "2";
- // }
- // });
- // // let data = res.data.list;
- // this.total = res.data.totalRecord;
- // this.loading = false;
- // });
- },
- //定稿
- getFinalized() {
- this.$http({
- url: "/market/ggsj/queryDone",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
- },
- data: {},
- }).then((res) => {
- console.log(res);
- // let size = this.isNaNStatus(res.data);
- this.tableData = res.data.data;
- this.tableData.map((item) => {
- item.status = "2";
- });
- // let data = res.data.list;
- this.total = res.data.totalRecord;
- this.loading = false;
- });
- },
- //获取列表
- getList(e) {
- console.log(e);
- switch (e) {
- //我的待办
- case "0":
- this.auditStatus = true;
- this.getQueryList();
- break;
- //我的已办
- case "1":
- this.getQueryDone();
- break;
- //我发起的
- case "2":
- this.getMeLaunch();
- break;
- //定稿
- case "3":
- this.getFinalized();
- break;
- }
- // this.pageSize = n;
- // let _this = this;
- // this.tableData = [];
- // this.loading = true;
- // let param = {
- // tableName: "ggsj_process",
- // };
- // this.$http({
- // url: "/market/waf/queryTodoBase",
- // method: "post",
- // headers: {
- // "Content-Type": "application/json",
- // page: '{"pageNo":"' + n + '","pageSize":"10"}',
- // },
- // data: param,
- // }).then((res) => {
- // console.log(res);
- // this.tableData = res.data.data;
- // // let data = res.data.list;
- // this.total = res.data.totalRecord;
- // this.loading = false;
- // // this.isGDClick = false;
- // // if(this.advstatus==0){
- // // data.forEach(item => {
- // // item.isBtnShow = false;
- // // this.getSts(item)
- // // });
- // // }
- // // this.tableData = data;
- // });
- // this.$http({
- // url: "/market/waf/queryDoneBase",
- // method: "post",
- // headers: {
- // "Content-Type": "application/json",
- // page: '{"pageNo":"' + n + '","pageSize":"10"}',
- // },
- // data: param,
- // }).then((res) => {
- // // console.log(res);
- // // this.tableData = res.data.data;
- // // // let data = res.data.list;
- // // this.total = res.data.totalRecord;
- // // this.loading = false;
- // // this.isGDClick = false;
- // // if(this.advstatus==0){
- // // data.forEach(item => {
- // // item.isBtnShow = false;
- // // this.getSts(item)
- // // });
- // // }
- // // this.tableData = data;
- // });
- },
- async getSts(v) {
- await this.$http({
- url: "/bpm/api/taskInit",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- taskId: v.taskId,
- woNo: v.id,
- },
- }).then((res) => {
- this.shParam = res.data;
- // this.dialogCli(1);
- // callback&&callback()
- if (this.isGDClick) {
- this.dialogCli(1);
- return;
- }
- if (res.data.taskName == "需求部门") {
- v.sts = "3";
- return;
- }
- if (res.data.assigneeNo == this.userInfo.loginNo) {
- v.sts = "0";
- v.isBtnShow = true;
- return;
- }
- });
- },
- // 分页
- currchange(v) {
- console.log(123);
- console.log(v);
- this.pageSize = v;
- console.log(this.clickStatus);
- this.getList(this.clickStatus);
- },
- advchange(e) {
- this.total = 0
- this.pageSize = 1
- this.clickStatus = e
- this.getList(this.clickStatus);
- },
- //处理申请
- dialogCheck(n, v) {
- if (v == 1) {
- this.changeinfo = false;
- this.saveStatus = false
- } else {
- if(n.taskName == "科室经理审批"){
- this.draftStatus = false;
- }
- this.changeinfo = true;
- }
- this.typestatsu = 2;
- this.dialogStatus = true;
- let params = {
- woNo: n.id,
- taskId: n.taskId,
- };
- this.componentInfo = n;
- this.componentStatus = true;
- },
- // 归档
- advSure(v) {
- let _this = this;
- // this.dialogStatusc = true;
- this.isGDClick = true;
- this.dgid = v.id;
- this.getSts(v);
- },
- dialogCli(v) {
- let _this = this;
- if (v == 1) {
- // let advTypeName = '';
- // for (let i = 0; i < this.typeList.length; i++) {
- // if (this.typeList[i].dataCode == this.advtype) {
- // advTypeName = this.typeList[i].dataName;
- // }
- // }
- // let param = {
- // woNo: this.dgid,
- // advTypeName: advTypeName,
- // advType: this.advtype
- // }
- let gdParam = {
- woNo: this.dgid,
- // advTypeName: advTypeName,
- // advType: this.advtype
- };
- this.shParam.params.terminalRes = JSON.stringify(
- Object.assign(JSON.parse(this.shParam.params.terminalRes), gdParam)
- );
- let param = this.shParam;
- this.$http({
- // url: "/market/cadv/mkConfirmAdv",
- url: "/bpm/api/submitTask",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: param,
- }).then((res) => {
- if (res.data.result === 1) {
- _this.$message({
- message: res.data.desc,
- type: "error",
- });
- } else {
- _this.$message({
- message: "成功",
- type: "success",
- });
- _this.getList(_this.params, _this.pageSize);
- }
- });
- }
- // this.dialogStatusc = false;
- // this.advtype = '';
- return;
- },
- closeEdio() {
- this.getList(this.params, this.pageSize);
- this.typestatsu = 1;
- this.dialogStatus = false;
- this.draftStatus = true;
- this.componentStatus = false;
- },
- gettype() {
- this.$http({
- url: "/sysmgr/cfgDataDicts/queryMap",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- dictCodePks: "materType",
- },
- }).then((res) => {
- this.typeList = res.data.body.materType;
- });
- },
- //功能栏
- iconCli(v) {
- if (v === 1) {
- this.getList(this.params, this.pageSize);
- }
- if (v === 2) {
- this.fullscreen = !this.fullscreen;
- }
- },
- ctrlbtn() {
- let v = JSON.parse(window.sessionStorage.childrenMenus);
- for (let i = 0; i < v.length; i++) {
- if (v[i].jspUrl == this.$route.path && v[i].systemflag == "1") {
- this.btnctrlStatus = true;
- return;
- }
- }
- },
- },
- mounted() {
- this.userInfo = JSON.parse(window.sessionStorage.userInfo);
- this.advstatus = String(this.$route.query.type);
- this.clickStatus = this.$route.query.type;
- this.getList(this.advstatus);
- this.ctrlbtn();
- this.gettype();
- },
- created() { },
- };
- </script>
- <style scoped lang="scss">
- .approval {
- .roval-box {
- padding: 0 20px;
- margin-top: 20px;
- margin-bottom: 10px;
- .el-input {
- width: calc(100% - 200px);
- display: inline-block;
- }
- span {
- display: inline-block;
- width: 80px;
- font-size: 14px;
- margin-right: 20px;
- .el-input {
- width: 100%;
- display: inline-block;
- }
- }
- }
- }
- .onetab {
- margin-bottom: 20px;
- padding: 0 20px;
- }
- .titbox {
- div {
- float: right;
- i {
- font-size: 22px;
- margin-left: 20px;
- cursor: pointer;
- }
- }
- }
- .tabbox {
- margin-top: 15px;
- }
- .pageBox {
- text-align: right;
- margin-top: 10px;
- }
- .info-line {
- width: 100%;
- display: block;
- padding-left: 20px;
- div {
- width: 50%;
- display: inline-block;
- }
- span {
- width: 80px;
- display: inline-block;
- text-align: left;
- i {
- color: red;
- display: inline-block;
- padding-right: 5px;
- }
- }
- .el-select,
- .el-input {
- width: calc(100% - 100px);
- }
- }
- .online {
- width: 100%;
- .el-select {
- width: calc(100% - 100px);
- }
- span {
- vertical-align: top;
- }
- .el-textarea {
- width: calc(100% - 100px);
- }
- }
- </style>
|