65496eb2dee8c26f0c1795c3df94ee4e2a8d1eb8.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <el-container>
  3. <el-main>
  4. <div v-loading="loading">
  5. <div style="margin-bottom: 15px;">
  6. <el-row style="margin-top: 10px;">
  7. <el-col :span="24" style="text-align: right;">
  8. <el-button type="primary" icon="el-icon-plus" @click="addDcFa" v-show="!ifMinistriesAgencies">新建通知</el-button>
  9. </el-col>
  10. </el-row>
  11. </div>
  12. <div style="margin-top:10px;">
  13. <el-table
  14. border
  15. ref="multipleTable"
  16. :height="tableHeight"
  17. :data="tableData"
  18. tooltip-effect="dark"
  19. style="width: 100%"
  20. >
  21. <el-table-column align="center" type="index" label="序号" min-width="25">
  22. <template slot-scope="scope">{{ (pageNum - 1) * pageSize + (scope.$index + 1) }}</template>
  23. </el-table-column>
  24. <el-table-column
  25. header-align="center"
  26. align="center"
  27. min-width="100"
  28. prop="title"
  29. label="发文标题"
  30. show-overflow-tooltip
  31. ></el-table-column>
  32. <el-table-column
  33. header-align="center"
  34. align="center"
  35. min-width="100"
  36. prop="rectSugg"
  37. label="整改说明"
  38. show-overflow-tooltip
  39. ></el-table-column>
  40. <el-table-column
  41. header-align="center"
  42. align="center"
  43. min-width="100"
  44. prop="intm"
  45. label="通知下发时间"
  46. show-overflow-tooltip
  47. ></el-table-column>
  48. <el-table-column
  49. header-align="center"
  50. align="center"
  51. min-width="100"
  52. prop="rectTerm"
  53. label="整改时间"
  54. ></el-table-column>
  55. <el-table-column
  56. align="center"
  57. min-width="200"
  58. label="操作"
  59. fixed="right"
  60. >
  61. <template slot-scope="scope">
  62. <!--省级-->
  63. <span v-if="ifMinistriesAgencies">
  64. <el-button v-show="Number(scope.row.state)" type="primary" size="mini" @click.stop="lookOver(scope.row)">查看</el-button>
  65. <el-button v-show="Number(scope.row.state)" type="info" size="mini" @click.stop="zgClick(scope.row)">整改反馈</el-button>
  66. <el-button v-show="!Number(scope.row.state)" type="primary" size="mini" @click.stop="fangAnModifyThe(scope.row)">编辑</el-button>
  67. <el-button v-show="!Number(scope.row.state)" type="warning" size="mini" @click.stop="issuedByThe(scope.row)">下发</el-button>
  68. <el-button v-show="!Number(scope.row.state)" type="danger" size="mini" @click.stop="fangAnDelete(scope.row)">删除</el-button>
  69. </span>
  70. <!--建安中心-->
  71. <span v-else-if="!ifMinistriesAgencies">
  72. <el-button v-show="Number(scope.row.state)" type="primary" size="mini" @click.stop="lookOver(scope.row)">查看</el-button>
  73. <el-button v-show="Number(scope.row.state)" type="info" size="mini" @click.stop="zgClick(scope.row)">整改反馈</el-button>
  74. <el-button v-show="!Number(scope.row.state)" type="primary" size="mini" @click.stop="fangAnModifyThe(scope.row)">编辑</el-button>
  75. <el-button v-show="!Number(scope.row.state)" type="warning" size="mini" @click.stop="issuedByThe(scope.row)">下发</el-button>
  76. <el-button v-show="!Number(scope.row.state)" type="danger" size="mini" @click.stop="fangAnDelete(scope.row)">删除</el-button>
  77. </span>
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. </div>
  82. </div>
  83. </el-main>
  84. <!-- 新建督查方案框 -->
  85. <el-dialog :title="dialogFaTitle" :visible.sync="addPlanDialogVisible" v-if="addPlanDialogVisible" width="60%" append-to-body :close-on-click-modal="false" >
  86. <el-form :model="zhengGaiForm" ref="zhengGaiForm" :label-width="formLabelWidth" class="zhenggai_form">
  87. <el-form-item label="通知名称" prop="plnNm">
  88. <el-input v-model="zhengGaiForm.title" placeholder="请输入通知名称" :disabled="zgButton"></el-input>
  89. </el-form-item>
  90. <el-form-item label="整改截止期限" prop="planYr">
  91. <el-date-picker
  92. v-model="zhengGaiForm.rectTerm"
  93. type="date"
  94. value-format="yyyy-MM-dd"
  95. placeholder="选择整改截止期限"
  96. :disabled="zgButton">
  97. </el-date-picker>
  98. </el-form-item>
  99. <el-form-item label="整改说明" prop="planCnt">
  100. <el-input type="textarea" rows="10" v-model="zhengGaiForm.rectSugg" clearable placeholder="请输入整改说明" :disabled="zgButton"></el-input>
  101. </el-form-item>
  102. <el-form-item label="一省一单">
  103. <div class="show_wrapper" :style="{'height':tableHeight1 + 'px','overflow':'hidden'}">
  104. <zgfc :currentNodeId="groupId" :type="type"></zgfc>
  105. </div>
  106. </el-form-item>
  107. </el-form>
  108. <div slot="footer" class="dialog-footer">
  109. <el-button @click="addPlanDialogVisible = false">取 消</el-button>
  110. <el-button type="primary" @click="appendPlan('zhengGaiForm')" >保 存</el-button>
  111. </div>
  112. </el-dialog>
  113. <!--整改反馈-->
  114. <el-dialog width="80%" title="整改反馈" :visible.sync="zgfkDialog" v-if="zgfkDialog">
  115. <reformFeedback :rectId="rectId" :ifMinistriesAgencies="ifMinistriesAgencies" ref="updateQk"></reformFeedback>
  116. <div slot="footer" class="dialog-footer" style="text-align: right">
  117. <el-button size="mini" type="primary" @click="addFile">保 存</el-button>
  118. </div>
  119. </el-dialog>
  120. </el-container>
  121. </template>
  122. <script>
  123. import addProblem from './addProblem.vue'
  124. import problemDetail from './problemDetail.vue'
  125. import addRectify from './addRectify.vue'
  126. import zgfc from '../../export/pageoffice/jc/zhenggaifankui/zgfk.vue'
  127. import reformFeedback from './reformFeedback'
  128. import request from '../../../utils/gw_ajax_request'
  129. import { dateFormat } from '../../../utils/gw_date';
  130. export default {
  131. props:["groupId","addvcd"],
  132. data(){
  133. return{
  134. tableHeight: window.innerHeight - 250,
  135. tableHeight1: window.innerHeight * .5,
  136. currentPage: 1,
  137. addProblemDialog: false,
  138. dialogDetailVisible: false,
  139. showRectifyDialog: false,
  140. currentNodeId:'',
  141. type:'1',
  142. tableData: [],
  143. loading: false,
  144. pageSize: 20,
  145. pageNum: 1,
  146. addPlanDialogVisible:false,
  147. dialogFaTitle: "",
  148. formLabelWidth:'200px',
  149. zhengGaiForm:{
  150. title: '',
  151. rectTerm: '',
  152. rectSugg: ""
  153. },
  154. zgButton: false,
  155. zgfkDialog: false,
  156. rectId:"",
  157. ifMinistriesAgencies: false
  158. }
  159. },
  160. components:{
  161. addProblem,
  162. problemDetail,
  163. addRectify,
  164. zgfc,
  165. reformFeedback
  166. },
  167. mounted(){
  168. // this.getNoticeData();
  169. },
  170. methods:{
  171. getNoticeData(){
  172. this.loading = true;
  173. let data = {
  174. "batch": this.groupId,
  175. "rectAddvcd": this.addvcd
  176. }
  177. this.$nextTick(()=>{
  178. request.post(`/tac/pblm/rect/info/getRectInfByBatchAd`,data).then(res =>{
  179. if(res.success){
  180. this.loading = false;
  181. this.tableData = res.data;
  182. this.tableData.forEach(item =>{
  183. item.intm = dateFormat(item.intm, "yyyy-MM-dd");
  184. item.uptm = dateFormat(item.uptm, "yyyy-MM-dd");
  185. item.rectTerm = dateFormat(item.rectTerm, "yyyy-MM-dd");
  186. })
  187. }
  188. })
  189. })
  190. },
  191. //添加
  192. addDcFa(){
  193. this.dialogFaTitle = '新建通知';
  194. this.addPlanDialogVisible = true;
  195. for(var obj in this.zhengGaiForm){
  196. this.zhengGaiForm[obj] = '';
  197. }
  198. this.zgButton = false;
  199. },
  200. //添加确定
  201. appendPlan(formName){
  202. if(this.dialogFaTitle == '新建通知'){
  203. this.$refs[formName].validate((valid) => {
  204. if (valid) {
  205. let obj = {};
  206. obj.groupId = this.groupId;//督查组ID ,
  207. obj.rectAddvcd = this.addvcd;//整改行政区代码
  208. obj.title = this.zhengGaiForm.title;//发文标题
  209. obj.rectSugg = this.zhengGaiForm.rectSugg;//整改建议
  210. obj.persId = localStorage.getItem("userid");
  211. obj.rectTerm = this.zhengGaiForm.rectTerm;//整改时限
  212. request.post('/tac/pblm/rect/info/add',obj).then((res)=>{
  213. if(res.success){
  214. this.$nextTick(() =>{
  215. this.$message.success("新建通知成功");
  216. this.addPlanDialogVisible = false;
  217. this.getNoticeData();
  218. })
  219. }
  220. })
  221. } else {
  222. console.log('error submit!!');
  223. return false;
  224. }
  225. });
  226. }
  227. else{
  228. this.$refs[formName].validate((valid) => {
  229. if (valid) {
  230. let obj = {};
  231. obj.groupId = this.groupId;//督查组ID ,
  232. obj.rectAddvcd = this.addvcd;//整改行政区代码
  233. obj.title = this.zhengGaiForm.title;//发文标题
  234. obj.rectSugg = this.zhengGaiForm.rectSugg;//整改建议
  235. obj.persId = localStorage.getItem("userid");
  236. obj.rectTerm = this.zhengGaiForm.rectTerm;//整改时限
  237. obj.id = this.zhengGaiForm.id;
  238. request.post('/tac/pblm/rect/info/update',obj).then((res)=>{
  239. if(res.success){
  240. this.$nextTick(() =>{
  241. this.$message.success("更改通知成功");
  242. this.addPlanDialogVisible = false;
  243. this.getNoticeData();
  244. })
  245. }
  246. })
  247. } else {
  248. console.log('error submit!!');
  249. return false;
  250. }
  251. });
  252. }
  253. },
  254. toAddProblem(){
  255. this.addProblemDialog = true
  256. },
  257. dialogClose(){
  258. this.addProblemDialog = false
  259. this.showRectifyDialog = false
  260. },
  261. toShowDetail(){
  262. this.dialogDetailVisible = true
  263. },
  264. toShowRectify(){
  265. this.showRectifyDialog = true
  266. },
  267. exportTable(){},
  268. handleSizeChange(){},
  269. handleCurrentChange(){},
  270. // 查看
  271. lookOver(row){
  272. this.getIdData(row.id);
  273. this.dialogFaTitle = '查看通知';
  274. this.addPlanDialogVisible = true;
  275. this.zgButton = true;
  276. },
  277. //方案编辑
  278. fangAnModifyThe(row){
  279. this.dialogFaTitle = '编辑通知';
  280. this.getIdData(row.id);
  281. this.addPlanDialogVisible = true;
  282. this.zgButton = false;
  283. },
  284. getIdData(id){
  285. request.get(`/tac/pblm/rect/info/${id}`).then(res =>{
  286. this.zhengGaiForm = res.data;
  287. this.zhengGaiForm.intm = dateFormat(this.zhengGaiForm.intm, "yyyy-MM-dd");
  288. this.zhengGaiForm.uptm = dateFormat(this.zhengGaiForm.uptm, "yyyy-MM-dd");
  289. this.zhengGaiForm.rectTerm = dateFormat(this.zhengGaiForm.rectTerm, "yyyy-MM-dd");
  290. })
  291. },
  292. //下发
  293. issuedByThe(row){
  294. this.$confirm('确定要下发通知, 是否继续?', '提示', {
  295. confirmButtonText: '确定',
  296. cancelButtonText: '取消',
  297. type: 'warning'
  298. }).then(() => {
  299. if(row.id){
  300. request.post(`/tac/pblm/rect/info/rectInfo?id=${row.id}`).then((res)=>{
  301. if(res.success) {
  302. // this.ifMinistriesAgencies = true;
  303. this.$message({
  304. type: 'success',
  305. message: '下发成功!'
  306. });
  307. this.getNoticeData();
  308. }
  309. })
  310. }
  311. }).catch(() => {
  312. this.$message({
  313. type: 'info',
  314. message: '已取消下发'
  315. });
  316. });
  317. },
  318. //删除
  319. fangAnDelete(row){
  320. this.$confirm('确定要删除该数据, 是否继续?', '提示', {
  321. confirmButtonText: '确定',
  322. cancelButtonText: '取消',
  323. type: 'warning'
  324. }).then(() => {
  325. request.post(`/tac/pblm/rect/info/delete/${row.id}`).then(res =>{
  326. if(res.success){
  327. this.$message({
  328. type: 'success',
  329. message: '删除成功'
  330. })
  331. this.getNoticeData();
  332. }
  333. })
  334. }).catch(() => {
  335. this.$message({
  336. type: 'info',
  337. message: '已取消删除'
  338. });
  339. });
  340. },
  341. // 查看整改反馈
  342. zgClick(row){
  343. this.rectId = row.id;
  344. this.zgfkDialog = true;
  345. },
  346. //保存
  347. addFile(){
  348. this.$refs.updateQk.updateQk();
  349. },
  350. },
  351. watch:{
  352. groupId(){
  353. this.getNoticeData();
  354. }
  355. }
  356. }
  357. </script>
  358. <style lang="scss">
  359. .footer_btn{
  360. text-align: right;
  361. }
  362. .show_wrapper{
  363. border:1px solid gray;
  364. width:100%;
  365. overflow: hidden;
  366. }
  367. .zhenggai_form .el-input,.zhenggai_form textarea.el-textarea__inner {
  368. width: 20vw;
  369. }
  370. </style>