message.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265
  1. <template>
  2. <el-tabs v-model="activeName" @tab-click="handleClick">
  3. <el-tab-pane label="用户消息" name="first">
  4. <el-table v-loading="tableDataLoading" :data="tableData.list">
  5. <el-table-column prop="id" label="编号" width="80">
  6. </el-table-column>
  7. <el-table-column prop="userName" label="用户名" width="160">
  8. <template slot-scope="scope">
  9. <div style="color: #0066CC;cursor: pointer;" @click="updataDetails(scope.row.userId)">
  10. {{scope.row.userName}}
  11. </div>
  12. </template>
  13. </el-table-column>
  14. <el-table-column prop="title" label="标题">
  15. </el-table-column>
  16. <el-table-column prop="content" label="内容">
  17. </el-table-column>
  18. <el-table-column prop="createAt" label="创建时间" width="160">
  19. </el-table-column>
  20. </el-table>
  21. <div style="text-align: center;margin-top: 10px;">
  22. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  23. :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
  24. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  25. </el-pagination>
  26. </div>
  27. </el-tab-pane>
  28. <el-tab-pane label="系统消息" name="firstJb">
  29. <el-table v-loading="tableDataLoading" :data="tableData.list">
  30. <el-table-column prop="id" label="编号" width="80">
  31. </el-table-column>
  32. <el-table-column prop="userName" label="接收用户" width="160">
  33. <template slot-scope="scope">
  34. <div style="color: #0066CC;cursor: pointer;" @click="updataDetails(scope.row.userId)">
  35. {{scope.row.userName}}
  36. </div>
  37. </template>
  38. </el-table-column>
  39. <el-table-column prop="title" label="标题">
  40. </el-table-column>
  41. <el-table-column prop="content" label="内容">
  42. </el-table-column>
  43. <el-table-column prop="createAt" label="创建时间" width="160">
  44. </el-table-column>
  45. </el-table>
  46. <div style="text-align: center;margin-top: 10px;">
  47. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  48. :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
  49. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  50. </el-pagination>
  51. </div>
  52. </el-tab-pane>
  53. <el-tab-pane label="投诉消息" name="second">
  54. <!-- <span>投诉类型:</span>
  55. <el-select v-model="platform1" style="width:150px;margin-left: 10px;" @change="animeDat4(platform1)">
  56. <el-option v-for="item in platformList" :key="item.id" :label="item.name" :value="item.id">
  57. </el-option>
  58. </el-select>&nbsp;&nbsp;&nbsp; -->
  59. <el-table v-loading="tableDataLoading" :data="tableData.records">
  60. <el-table-column prop="id" label="编号" width="80">
  61. </el-table-column>
  62. <el-table-column prop="userName" label="投诉用户" width="160">
  63. <template slot-scope="scope">
  64. <div style="color: #0066CC;cursor: pointer;" @click="updataDetails(scope.row.userId)">
  65. {{scope.row.userName}}
  66. </div>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="userName" label="被投诉用户" width="160">
  70. <template slot-scope="scope">
  71. <div style="color: #0066CC;cursor: pointer;" @click="updataDetails(scope.row.byUserId)">
  72. {{scope.row.byUserName}}
  73. </div>
  74. </template>
  75. </el-table-column>
  76. <!-- <el-table-column prop="platform" label="投诉类型">
  77. <template slot-scope="scope">
  78. <div v-if="scope.row.platform==1">聊天投诉</div>
  79. <div v-if="scope.row.platform==2">用户投诉</div>
  80. <div v-if="scope.row.platform==3">动态投诉</div>
  81. <div v-if="scope.row.platform==4">服务投诉</div>
  82. </template>
  83. </el-table-column> -->
  84. <el-table-column prop="content.content" label="投诉内容">
  85. </el-table-column>
  86. <el-table-column prop="imgs" label="图片">
  87. <template slot-scope="scope">
  88. <div v-if="scope.row.content&&scope.row.content.imgs">
  89. <div v-for="(item,index) in scope.row.content.imgs.split(',')" :key="index"
  90. style="display: inline-block; margin: 3px;">
  91. <el-popover placement="top-start" title="" trigger="hover">
  92. <img style="width: 50px; height: 50px" :src="item" alt="" slot="reference">
  93. <img style="width: 300px; height: auto" :src="item" alt="">
  94. </el-popover>
  95. </div>
  96. </div>
  97. </template>
  98. </el-table-column>
  99. <!-- <el-table-column prop="status" label="状态">
  100. <template slot-scope="scope">
  101. <div v-if="scope.row.status==0">待审核</div>
  102. <div v-else>已审核</div>
  103. </template>
  104. </el-table-column>
  105. <el-table-column prop="status" label="处理结果">
  106. <template slot-scope="scope">
  107. <div v-if="scope.row.status==0">待处理</div>
  108. <div v-if="scope.row.status==1">不处理</div>
  109. <div v-if="scope.row.status==2">已封号</div>
  110. <div v-if="scope.row.status==3">已删除</div>
  111. </template>
  112. </el-table-column>
  113. <el-table-column prop="auditContent" label="审核内容">
  114. </el-table-column> -->
  115. <el-table-column prop="createAt" label="创建时间" width="160">
  116. </el-table-column>
  117. <!-- <el-table-column label="操作">
  118. <template slot-scope="scope">
  119. <el-button size="mini" type="primary" v-if="scope.row.status==0"
  120. @click="refuseClick(scope.row)">处理
  121. </el-button>
  122. </template>
  123. </el-table-column> -->
  124. </el-table>
  125. <div style="text-align: center;margin-top: 10px;">
  126. <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
  127. :page-sizes="[10, 20, 30, 50, 100]" :page-size="limit" :current-page="page"
  128. layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
  129. </el-pagination>
  130. </div>
  131. </el-tab-pane>
  132. <el-tab-pane label="简历投诉" name="secondJl">
  133. <el-table v-loading="tableDataLoading" :data="tableData.records">
  134. <el-table-column prop="id" label="编号" width="80">
  135. </el-table-column>
  136. <el-table-column prop="userName" label="投诉用户" width="160">
  137. <template slot-scope="scope">
  138. <div style="color: #0066CC;cursor: pointer;" @click="updataDetails(scope.row.userId)">
  139. {{scope.row.userName}}
  140. </div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column prop="userName" label="被投诉用户" width="160">
  144. <template slot-scope="scope">
  145. <div style="color: #0066CC;cursor: pointer;" @click="updataDetails(scope.row.byUserId)">
  146. {{scope.row.byUserName}}
  147. </div>
  148. </template>
  149. </el-table-column>
  150. <el-table-column prop="content.content" label="投诉内容">
  151. </el-table-column>
  152. <el-table-column prop="imgs" label="图片">
  153. <template slot-scope="scope">
  154. <div v-if="scope.row.content&&scope.row.content.imgs">
  155. <div v-for="(item,index) in scope.row.content.imgs.split(',')" :key="index"
  156. style="display: inline-block; margin: 3px;">
  157. <el-popover placement="top-start" title="" trigger="hover">
  158. <img style="width: 50px; height: 50px" :src="item" alt="" slot="reference">
  159. <img style="width: 300px; height: auto" :src="item" alt="">
  160. </el-popover>
  161. </div>
  162. </div>
  163. </template>
  164. </el-table-column>
  165. <!-- <el-table-column prop="status" label="状态">
  166. <template slot-scope="scope">
  167. <div v-if="scope.row.status==0">待审核</div>
  168. <div v-else>已审核</div>
  169. </template>
  170. </el-table-column>
  171. <el-table-column prop="status" label="处理结果">
  172. <template slot-scope="scope">
  173. <div v-if="scope.row.status==0">待处理</div>
  174. <div v-if="scope.row.status==1">不处理</div>
  175. <div v-if="scope.row.status==2">已封号</div>
  176. <div v-if="scope.row.status==3">已删除</div>
  177. </template>
  178. </el-table-column>
  179. <el-table-column prop="auditContent" label="审核内容">
  180. </el-table-column> -->
  181. <el-table-column prop="createAt" label="创建时间" width="160">
  182. </el-table-column>
  183. <!-- <el-table-column label="操作">
  184. <template slot-scope="scope">
  185. <el-button size="mini" type="primary" v-if="scope.row.status==0"
  186. @click="refuseClick(scope.row)">处理
  187. </el-button>
  188. </template>
  189. </el-table-column> -->
  190. </el-table>
  191. <div style="text-align: center;margin-top: 10px;">
  192. <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
  193. :page-sizes="[10, 20, 30, 50, 100]" :page-size="limit" :current-page="page"
  194. layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
  195. </el-pagination>
  196. </div>
  197. </el-tab-pane>
  198. <el-tab-pane label="公告中心" name="gonggap">
  199. <div style="float: right;margin-right:2%;">
  200. <el-button style='margin: 10px 0;' :disabled="!isAuth('message:add')" size="mini" type="primary"
  201. icon="document" @click="addNotice()">添加</el-button>
  202. </div>
  203. <el-table v-loading="tableDataLoading" :data="tableData.list">
  204. <el-table-column prop="id" label="编号" width="80">
  205. </el-table-column>
  206. <el-table-column prop="type" label="类型">
  207. <template slot-scope="scope">
  208. <span v-if="scope.row.type==1">个人</span>
  209. <span v-else-if="scope.row.type==2">企业</span>
  210. </template>
  211. </el-table-column>
  212. <el-table-column prop="title" label="标题">
  213. </el-table-column>
  214. <!-- <el-table-column prop="url" label="地址">
  215. </el-table-column> -->
  216. <el-table-column prop="createAt" label="创建时间" width="160">
  217. </el-table-column>
  218. <el-table-column fixed='right' label="操作" width="100">
  219. <template slot-scope="scope">
  220. <el-button size="mini" type="primary" :disabled="!isAuth('message:update')"
  221. @click="addNotice(scope.row)" style="margin: 5px;">
  222. 修改
  223. </el-button>
  224. <el-button size="mini" type="danger" :disabled="!isAuth('message:delete')"
  225. @click="deleteNotice(scope.row)" style="margin: 5px;">
  226. 删除
  227. </el-button>
  228. </template>
  229. </el-table-column>
  230. </el-table>
  231. <div style="text-align: center;margin-top: 10px;">
  232. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  233. :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
  234. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  235. </el-pagination>
  236. </div>
  237. </el-tab-pane>
  238. <el-tab-pane label="意见反馈" name="fourth">
  239. <el-table v-loading="tableDataLoading" :data="tableData.list">
  240. <el-table-column prop="id" label="编号" width="80">
  241. </el-table-column>
  242. <!-- <el-table-column prop="userName" label="用户名称">
  243. <template slot-scope="scope">
  244. <div>{{scope.row.userName?scope.row.userName:'未绑定'}}</div>
  245. </template>
  246. </el-table-column> -->
  247. <el-table-column prop="title" label="消息标题">
  248. </el-table-column>
  249. <el-table-column prop="content" label="消息内容">
  250. </el-table-column>
  251. <el-table-column prop="createAt" label="创建时间" width="160">
  252. </el-table-column>
  253. <!-- <el-table-column label="操作">
  254. <template slot-scope="scope">
  255. <el-button size="mini" type="primary" @click="updataDetails(scope.row)">用户详情
  256. </el-button>
  257. </template>
  258. </el-table-column> -->
  259. </el-table>
  260. <div style="text-align: center;margin-top: 10px;">
  261. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  262. :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
  263. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  264. </el-pagination>
  265. </div>
  266. </el-tab-pane>
  267. <el-tab-pane label="求职者常用短语" name="erMessage">
  268. <el-button style="margin:10px;" size="mini" type="primary" icon="document"
  269. :disabled="!isAuth('message:add')" @click="erMessageAdd(0)">添加
  270. </el-button>
  271. <el-table v-loading="tableDataLoading" :data="tableData.list">
  272. <el-table-column prop="id" label="编号" width="80">
  273. </el-table-column>
  274. <el-table-column prop="title" label="消息标题">
  275. </el-table-column>
  276. <el-table-column prop="content" label="消息内容">
  277. </el-table-column>
  278. <el-table-column prop="createAt" label="创建时间" width="160">
  279. </el-table-column>
  280. <el-table-column label="操作" prop="id" width="200" fixed='right' align="center">
  281. <template slot-scope="scope">
  282. <el-button size="mini" type="primary" :disabled="!isAuth('positionList:update')" style="margin: 5px;"
  283. @click="erMessageAdd(1,scope.row)">修改
  284. </el-button>
  285. <el-button size="mini" type="danger" :disabled="!isAuth('positionList:delete')" style="margin: 5px;"
  286. @click="erMessageDelete(scope.row)">删除
  287. </el-button>
  288. </template>
  289. </el-table-column>
  290. </el-table>
  291. <div style="text-align: center;margin-top: 10px;">
  292. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  293. :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
  294. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  295. </el-pagination>
  296. </div>
  297. </el-tab-pane>
  298. <el-tab-pane label="企业方常用短语" name="eeMessage">
  299. <el-button style="margin:10px;" size="mini" type="primary" icon="document"
  300. :disabled="!isAuth('message:add')" @click="eeMessageAdd(0)">添加
  301. </el-button>
  302. <el-table v-loading="tableDataLoading" :data="tableData.list">
  303. <el-table-column prop="id" label="编号" width="80">
  304. </el-table-column>
  305. <el-table-column prop="title" label="消息标题">
  306. </el-table-column>
  307. <el-table-column prop="content" label="消息内容">
  308. </el-table-column>
  309. <el-table-column prop="createAt" label="创建时间" width="160">
  310. </el-table-column>
  311. <el-table-column label="操作" prop="id" width="200" fixed='right' align="center">
  312. <template slot-scope="scope">
  313. <el-button size="mini" type="primary" :disabled="!isAuth('positionList:update')" style="margin: 5px;"
  314. @click="eeMessageAdd(1,scope.row)">修改
  315. </el-button>
  316. <el-button size="mini" type="danger" :disabled="!isAuth('positionList:delete')" style="margin: 5px;"
  317. @click="eeMessageDelete(scope.row)">删除
  318. </el-button>
  319. </template>
  320. </el-table-column>
  321. </el-table>
  322. <div style="text-align: center;margin-top: 10px;">
  323. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  324. :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
  325. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  326. </el-pagination>
  327. </div>
  328. </el-tab-pane>
  329. <!-- 添加、修改求职者常用短语 -->
  330. <el-dialog :title="titles" :visible.sync="dialogFormVisible9" center>
  331. <div style="margin-bottom: 10px;">
  332. <span style="width: 200px;display: inline-block;text-align: right;">消息内容:</span>
  333. <el-input style="width:50%;" v-model="content" type="text" placeholder="请输入消息内容"></el-input>
  334. </div>
  335. <div slot="footer" class="dialog-footer">
  336. <el-button @click="dialogFormVisible9 = false">取 消</el-button>
  337. <el-button type="primary" @click="addErMessage()">确 定</el-button>
  338. </div>
  339. </el-dialog>
  340. <!-- 添加、修改企业方常用短语 -->
  341. <el-dialog :title="titles" :visible.sync="dialogFormVisible10" center>
  342. <div style="margin-bottom: 10px;">
  343. <span style="width: 200px;display: inline-block;text-align: right;">消息内容:</span>
  344. <el-input style="width:50%;" v-model="content" type="text" placeholder="请输入消息内容"></el-input>
  345. </div>
  346. <div slot="footer" class="dialog-footer">
  347. <el-button @click="dialogFormVisible10 = false">取 消</el-button>
  348. <el-button type="primary" @click="addEeMessage()">确 定</el-button>
  349. </div>
  350. </el-dialog>
  351. <!-- <el-tab-pane label="消息推送" name="seventh">
  352. <div style="float: right;margin-right:2%;">
  353. <el-button style='margin: 10px 0;' :disabled="!isAuth('message:push')" size="mini" type="primary"
  354. icon="document" @click="magNotice">消息推送</el-button>
  355. </div>
  356. <el-table v-loading="tableDataLoading" :data="tableData.list">
  357. <el-table-column fixed prop="id" label="编号" width="80">
  358. </el-table-column>
  359. <el-table-column prop="userName" label="用户名称">
  360. </el-table-column>
  361. <el-table-column prop="title" label="消息标题">
  362. </el-table-column>
  363. <el-table-column prop="content" label="消息内容" width="280">
  364. </el-table-column>
  365. <el-table-column prop="createAt" label="创建时间">
  366. </el-table-column>
  367. <el-table-column label="操作" width="120">
  368. <template slot-scope="scope">
  369. <el-button size="mini" type="primary" @click="updataDetails(scope.row)">用户详情
  370. </el-button>
  371. </template>
  372. </el-table-column>
  373. </el-table>
  374. <div style="text-align: center;margin-top: 10px;">
  375. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  376. :page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
  377. layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
  378. </el-pagination>
  379. </div> -->
  380. <!-- 消息推送 -->
  381. <!-- <el-dialog title="消息推送" :visible.sync="dialogFormVisible2" center>
  382. <div style="margin-bottom: 10px;">
  383. <span style="width: 200px;display: inline-block;text-align: right;">选择:</span>
  384. <el-select v-model="flag" placeholder="请选择类型" style="width:50%" >
  385. <el-option v-for="item in flags" :key="item.value" :label="item.label" :value="item.value">
  386. </el-option>
  387. </el-select>&nbsp;&nbsp;&nbsp;&nbsp;
  388. </div>
  389. <div style="margin-bottom: 10px;" v-if="flag == 1">
  390. <span style="width: 200px;display: inline-block;text-align: right;">用户手机号:</span>
  391. <el-input style="width: 50%;" v-model="phone" placeholder="请输入用户手机号"></el-input>
  392. </div>
  393. <div style="margin-bottom: 10px;">
  394. <span style="width: 200px;display: inline-block;text-align: right;">消息标题:</span>
  395. <el-input style="width: 50%;" v-model="title" placeholder="请输入消息标题"></el-input>
  396. </div>
  397. <div style="margin-bottom: 10px;">
  398. <span style="width: 200px;display: inline-block;text-align: right;position: relative;top: -65px;">消息内容:</span>
  399. <el-input style="width: 50%;" type="textarea" rows="4" v-model="content" placeholder="请输入消息内容"></el-input>
  400. </div>
  401. <div slot="footer" class="dialog-footer">
  402. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  403. <el-button type="primary" @click="magNoticeTo()">确 定</el-button>
  404. </div>
  405. </el-dialog>
  406. </el-tab-pane> -->
  407. <el-dialog title="投诉处理" :visible.sync="dialogFormVisible" center>
  408. <div style="margin-bottom: 10px;">
  409. <span style="width: 200px;display: inline-block;text-align: right;">审核结果:</span>
  410. <el-radio-group v-model="radio">
  411. <el-radio :label="0">通过</el-radio>
  412. <el-radio :label="1">驳回</el-radio>
  413. </el-radio-group>
  414. </div>
  415. <div style="margin-bottom: 10px;" v-if="radio===1">
  416. <span
  417. style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">驳回理由:</span>
  418. <el-input style="width:50%;" v-model="content" type="textarea" :rows="4" placeholder="请输入驳回理由">
  419. </el-input>
  420. </div>
  421. <div style="margin-bottom: 10px;" v-if="radio===0">
  422. <span style="width: 200px;display: inline-block;text-align: right;">处理结果:</span>
  423. <el-radio-group v-model="clStatus">
  424. <el-radio :label="0">封号</el-radio>
  425. <el-radio :label="1" v-if="platform==3||platform==4">删除</el-radio>
  426. </el-radio-group>
  427. </div>
  428. <div slot="footer" class="dialog-footer">
  429. <el-button @click="dialogFormVisible = false">取 消</el-button>
  430. <el-button type="primary" @click="refuseto()">确 定</el-button>
  431. </div>
  432. </el-dialog>
  433. <!-- 添加/修改公告 -->
  434. <el-dialog :title="titles" :visible.sync="dialogFormVisible1" center>
  435. <div style="margin-bottom: 10px;">
  436. <span style="width: 200px;display: inline-block;text-align: right;">类型:</span>
  437. <el-radio-group v-model="type">
  438. <el-radio :label="1">个人</el-radio>
  439. <el-radio :label="2">企业</el-radio>
  440. </el-radio-group>
  441. </div>
  442. <div style="margin-bottom: 10px;">
  443. <span style="width: 200px;display: inline-block;text-align: right;">标题:</span>
  444. <el-input style="width:50%;" v-model="titleMsg" placeholder="请输入标题">
  445. </el-input>
  446. </div>
  447. <div slot="footer" class="dialog-footer">
  448. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  449. <el-button type="primary" @click="refusetoGg()">确 定</el-button>
  450. </div>
  451. </el-dialog>
  452. </el-tabs>
  453. </template>
  454. <script>
  455. export default {
  456. data() {
  457. return {
  458. limit: 10,
  459. page: 1,
  460. state: 5,
  461. url: '',
  462. title: '',
  463. type: 1,
  464. id: '',
  465. form: {
  466. id: '',
  467. title: '',
  468. url: '',
  469. type: '',
  470. state: '',
  471. types: [{
  472. value: 'word',
  473. label: '文字'
  474. },
  475. {
  476. value: 'url',
  477. label: '链接'
  478. }
  479. ],
  480. },
  481. phone: '',
  482. content: '',
  483. flag: '',
  484. flags: [{
  485. value: 1,
  486. label: '单个用户'
  487. },
  488. {
  489. value: 2,
  490. label: '全部用户'
  491. }
  492. ],
  493. formLabelWidth: '200px',
  494. activeName: 'first',
  495. tableDataLoading: false,
  496. dialogFormVisible1: false,
  497. dialogFormVisible2: false,
  498. dialogFormVisible: false,
  499. dialogFormVisible9: false,
  500. dialogFormVisible10: false,
  501. tableData: [],
  502. radio: '',
  503. clStatus: '',
  504. messageId: '',
  505. platform: '',
  506. platform1: '',
  507. platformList: [{
  508. id: '',
  509. name: '全部'
  510. },
  511. {
  512. id: 1,
  513. name: '聊天投诉'
  514. },
  515. {
  516. id: 2,
  517. name: '用户投诉'
  518. },
  519. {
  520. id: 3,
  521. name: '动态投诉'
  522. },
  523. {
  524. id: 4,
  525. name: '服务投诉'
  526. }
  527. ],
  528. titles: '添加',
  529. titleMsg: '',
  530. urlMsg: '',
  531. idMsg: '',
  532. }
  533. },
  534. methods: {
  535. // 详情跳转
  536. updataDetails(userId) {
  537. if (userId) {
  538. this.$router.push({
  539. path: '/userDetail',
  540. query: {
  541. userId: userId
  542. }
  543. });
  544. } else {
  545. this.$notify({
  546. title: '提示',
  547. duration: 1800,
  548. message: '当前用户未绑定',
  549. type: 'warning'
  550. });
  551. }
  552. },
  553. handleSizeChange(val) {
  554. this.limit = val;
  555. this.dataSelect()
  556. },
  557. handleCurrentChange(val) {
  558. this.page = val;
  559. this.dataSelect()
  560. },
  561. handleSizeChange1(val) {
  562. this.limit = val;
  563. this.dataSelect1()
  564. },
  565. handleCurrentChange1(val) {
  566. this.page = val;
  567. this.dataSelect1()
  568. },
  569. handleClick(tab, event) {
  570. if (tab._props.label == '意见反馈') {
  571. this.page = 1
  572. this.limit = 10
  573. this.state = 2
  574. this.dataSelect()
  575. }
  576. if (tab._props.label == '用户消息') {
  577. this.page = 1
  578. this.limit = 10
  579. this.state = 5
  580. this.dataSelect()
  581. }
  582. if (tab._props.label == '系统消息') {
  583. this.page = 1
  584. this.limit = 10
  585. this.state = 4
  586. this.dataSelect()
  587. }
  588. if (tab._props.label == '消息推送') {
  589. this.page = 1
  590. this.limit = 10
  591. this.state = 8
  592. this.dataSelect()
  593. }
  594. if (tab._props.label == '投诉消息') {
  595. this.page = 1
  596. this.limit = 10
  597. this.state = 3
  598. this.platform1 = 1
  599. this.dataSelect1()
  600. }
  601. if (tab._props.label == '公告中心') {
  602. this.page = 1
  603. this.limit = 10
  604. this.state = 1
  605. this.dataSelect()
  606. }
  607. if (tab._props.label == '简历投诉') {
  608. this.page = 1
  609. this.limit = 10
  610. this.state = 6
  611. this.platform1 = 1
  612. this.dataSelect1()
  613. }
  614. if (tab._props.label == '求职者常用短语') {
  615. this.page = 1
  616. this.limit = 10
  617. this.state = 70
  618. this.platform1 = 1
  619. this.dataSelect2()
  620. }
  621. if (tab._props.label == '企业方常用短语') {
  622. this.page = 1
  623. this.limit = 10
  624. this.state = 80
  625. this.platform1 = 1
  626. this.dataSelect2()
  627. }
  628. },
  629. // 消息推送
  630. magNotice() {
  631. this.dialogFormVisible2 = true
  632. },
  633. // 消息推送
  634. magNoticeTo() {
  635. if (this.flag == '') {
  636. this.$notify({
  637. title: '提示',
  638. duration: 1800,
  639. message: '请选择类型',
  640. type: 'warning'
  641. });
  642. return
  643. }
  644. if (this.title == '') {
  645. this.$notify({
  646. title: '提示',
  647. duration: 1800,
  648. message: '请输入标题',
  649. type: 'warning'
  650. });
  651. return
  652. }
  653. if (this.content == '') {
  654. this.$notify({
  655. title: '提示',
  656. duration: 1800,
  657. message: '请输入内容',
  658. type: 'warning'
  659. });
  660. return
  661. }
  662. if (this.flag == 1) {
  663. if (this.phone == '') {
  664. this.$notify({
  665. title: '提示',
  666. duration: 1800,
  667. message: '请输入用户手机号',
  668. type: 'warning'
  669. });
  670. return
  671. }
  672. this.$http({
  673. url: this.$http.adornUrl('/cash/sendMsg'),
  674. method: 'get',
  675. params: this.$http.adornParams({
  676. 'title': this.title,
  677. 'content': this.content,
  678. 'phone': this.phone,
  679. 'flag': this.flag
  680. })
  681. }).then(({
  682. data
  683. }) => {
  684. this.dialogFormVisible2 = false
  685. if (data.code == -100) {
  686. this.$message({
  687. message: data.msg,
  688. type: 'error',
  689. duration: 1500,
  690. onClose: () => {
  691. this.title = ''
  692. this.content = ''
  693. this.phone = ''
  694. this.flag = ''
  695. this.dataSelect()
  696. }
  697. })
  698. }
  699. if (data.code == 0) {
  700. this.$message({
  701. message: '操作成功',
  702. type: 'success',
  703. duration: 1500,
  704. onClose: () => {
  705. this.title = ''
  706. this.content = ''
  707. this.phone = ''
  708. this.flag = ''
  709. this.dataSelect()
  710. }
  711. })
  712. }
  713. })
  714. }
  715. if (this.flag == 2) {
  716. this.$http({
  717. url: this.$http.adornUrl('/cash/sendMsg'),
  718. method: 'get',
  719. params: this.$http.adornParams({
  720. 'title': this.title,
  721. 'content': this.content,
  722. 'flag': this.flag,
  723. })
  724. }).then(({
  725. data
  726. }) => {
  727. this.dialogFormVisible2 = false
  728. if (data.code == 0) {
  729. this.$message({
  730. message: '操作成功',
  731. type: 'success',
  732. duration: 1500,
  733. onClose: () => {
  734. this.title = ''
  735. this.content = ''
  736. this.flag = ''
  737. this.dataSelect()
  738. }
  739. })
  740. }
  741. })
  742. }
  743. },
  744. // 获取数据列表
  745. dataSelect() {
  746. this.tableDataLoading = true
  747. this.$http({
  748. url: this.$http.adornUrl(`message/page/${this.state}/${this.page}/${this.limit}`),
  749. method: 'get',
  750. params: this.$http.adornParams({})
  751. }).then(({
  752. data
  753. }) => {
  754. this.tableDataLoading = false
  755. if (this.state == 2||this.state == 6) {
  756. for (var i in data.data.list) {
  757. if (data.data.list[i].content) {
  758. var a = data.data.list[i].content.toString()
  759. var b = JSON.parse(a)
  760. data.data.list[i].content = b.content
  761. console.log('key', b.content)
  762. }
  763. }
  764. }
  765. let returnData = data.data;
  766. this.tableData = returnData
  767. })
  768. },
  769. // 获取数据列表
  770. dataSelect1() {
  771. this.tableDataLoading = true
  772. this.$http({
  773. url: this.$http.adornUrl(`message/selectComplaintByType`),
  774. method: 'get',
  775. params: this.$http.adornParams({
  776. 'page': this.page,
  777. 'limit': this.limit,
  778. 'state': this.state,
  779. // 'type': this.platform1
  780. })
  781. }).then(({
  782. data
  783. }) => {
  784. this.tableDataLoading = false
  785. if (this.state == 3||this.state == 6) {
  786. for (var i in data.data.records) {
  787. var a = data.data.records[i].content.toString()
  788. var b = JSON.parse(a)
  789. data.data.records[i].content = b
  790. console.log('key', data.data.records[i].content)
  791. }
  792. }
  793. // for (var i in data.data.records) {
  794. // if (data.data.records[i].imgs) {
  795. // data.data.records[i].imgs = data.data.list[i].imgs.split(',')
  796. // }
  797. // }
  798. let returnData = data.data;
  799. this.tableData = returnData
  800. })
  801. },
  802. // 获取求职者常用短语
  803. dataSelect2() {
  804. this.tableDataLoading = true
  805. this.$http({
  806. url: this.$http.adornUrl(`message/selectMessageByType`),
  807. method: 'get',
  808. params: this.$http.adornParams({
  809. 'page': this.page,
  810. 'limit': this.limit,
  811. 'state': this.state,
  812. // 'type': this.platform1
  813. })
  814. }).then(({
  815. data
  816. }) => {
  817. this.tableDataLoading = false
  818. if (this.state == 70) {
  819. for (var i in data.data.records) {
  820. var a = data.data.records[i].content.toString()
  821. var b = JSON.parse(a)
  822. data.data.records[i].content = b
  823. console.log('key', data.data.records[i].content)
  824. }
  825. }
  826. let returnData = data.data;
  827. this.tableData = returnData
  828. })
  829. },
  830. // 添加/修改企业方常用短语
  831. eeMessageAdd(index, row) { // index 0 添加,1 修改
  832. this.title = '企业方常用短语'
  833. this.state = 80
  834. if (index==1) {
  835. this.id = row.id
  836. this.titles = '修改常用短语'
  837. this.content = row.content
  838. } else {
  839. this.titles = '添加常用短语'
  840. this.id = ''
  841. this.content = ''
  842. }
  843. this.dialogFormVisible10 = true
  844. },
  845. // 提交修改、添加企业方常用短语
  846. addEeMessage() {
  847. if (this.content == '') {
  848. this.$notify({
  849. title: '提示',
  850. duration: 1800,
  851. message: '请输入消息内容',
  852. type: 'warning'
  853. })
  854. return
  855. }
  856. if (this.titles == '添加常用短语') {
  857. var urls = 'message/add'
  858. } else {
  859. var urls = 'message/update'
  860. }
  861. this.$http({
  862. url: this.$http.adornUrl(urls),
  863. method: 'post',
  864. data : this.$http.adornParams({
  865. 'id': this.id,
  866. 'content': this.content,
  867. 'state': 80,
  868. 'title': this.title
  869. })
  870. }).then(({
  871. data
  872. }) => {
  873. if(data.code==0){
  874. this.dialogFormVisible10 = false
  875. this.$message({
  876. message: '操作成功',
  877. type: 'success',
  878. duration: 1500,
  879. onClose: () => {
  880. this.dataSelect2()
  881. }
  882. })
  883. }else{
  884. this.$message({
  885. message: data.msg,
  886. type: 'warning',
  887. duration: 1500,
  888. onClose: () => {
  889. }
  890. })
  891. }
  892. })
  893. },
  894. // 删除分类
  895. eeMessageDelete(row) {
  896. this.$confirm(`确定删除此条信息?`, '提示', {
  897. confirmButtonText: '确定',
  898. cancelButtonText: '取消',
  899. type: 'warning'
  900. }).then(() => {
  901. this.$http({
  902. url: this.$http.adornUrl(`message/delete/${row.id}`),
  903. method: 'get',
  904. }).then(({
  905. data
  906. }) => {
  907. if(data.code==0){
  908. this.$message({
  909. message: '删除成功',
  910. type: 'success',
  911. duration: 1500,
  912. onClose: () => {
  913. this.dataSelect2()
  914. }
  915. })
  916. }else{
  917. this.$message({
  918. message: data.msg,
  919. type: 'warning',
  920. duration: 1500,
  921. onClose: () => {
  922. }
  923. })
  924. }
  925. })
  926. }).catch(() => {})
  927. },
  928. // 添加/修改求职者常用短语
  929. erMessageAdd(index, row) { // index 0 添加,1 修改
  930. this.title = '求职者常用短语'
  931. this.state = 70
  932. if (index==1) {
  933. this.id = row.id
  934. this.titles = '修改常用短语'
  935. this.content = row.content
  936. } else {
  937. this.titles = '添加常用短语'
  938. this.id = ''
  939. this.content = ''
  940. }
  941. this.dialogFormVisible9 = true
  942. },
  943. // 提交修改、添加服务分类
  944. addErMessage() {
  945. if (this.content == '') {
  946. this.$notify({
  947. title: '提示',
  948. duration: 1800,
  949. message: '请输入消息内容',
  950. type: 'warning'
  951. })
  952. return
  953. }
  954. if (this.titles == '添加常用短语') {
  955. var urls = 'message/add'
  956. } else {
  957. var urls = 'message/update'
  958. }
  959. this.$http({
  960. url: this.$http.adornUrl(urls),
  961. method: 'post',
  962. data : this.$http.adornParams({
  963. 'id': this.id,
  964. 'content': this.content,
  965. 'state': 70,
  966. 'title': this.title
  967. })
  968. }).then(({
  969. data
  970. }) => {
  971. if(data.code==0){
  972. this.dialogFormVisible9 = false
  973. this.$message({
  974. message: '操作成功',
  975. type: 'success',
  976. duration: 1500,
  977. onClose: () => {
  978. this.dataSelect2()
  979. }
  980. })
  981. }else{
  982. this.$message({
  983. message: data.msg,
  984. type: 'warning',
  985. duration: 1500,
  986. onClose: () => {
  987. }
  988. })
  989. }
  990. })
  991. },
  992. // 删除求职者常用短语
  993. erMessageDelete(row) {
  994. this.$confirm(`确定删除此条信息?`, '提示', {
  995. confirmButtonText: '确定',
  996. cancelButtonText: '取消',
  997. type: 'warning'
  998. }).then(() => {
  999. this.$http({
  1000. url: this.$http.adornUrl(`message/delete/${row.id}`),
  1001. method: 'get',
  1002. // params: this.$http.adornParams({
  1003. // 'postPreferenceId': row.postPreferenceId
  1004. // })
  1005. }).then(({
  1006. data
  1007. }) => {
  1008. if(data.code==0){
  1009. this.$message({
  1010. message: '删除成功',
  1011. type: 'success',
  1012. duration: 1500,
  1013. onClose: () => {
  1014. this.dataSelect2()
  1015. }
  1016. })
  1017. }else{
  1018. this.$message({
  1019. message: data.msg,
  1020. type: 'warning',
  1021. duration: 1500,
  1022. onClose: () => {
  1023. }
  1024. })
  1025. }
  1026. })
  1027. }).catch(() => {})
  1028. },
  1029. //审核弹框
  1030. refuseClick(rows) {
  1031. this.radio = ''
  1032. this.clStatus = ''
  1033. this.content = ''
  1034. this.messageId = rows.id
  1035. this.platform = rows.platform
  1036. this.dialogFormVisible = true
  1037. },
  1038. //提交审核
  1039. refuseto() {
  1040. if (this.radio === '') {
  1041. this.$notify({
  1042. title: '提示',
  1043. duration: 1800,
  1044. message: '请选择审核结果',
  1045. type: 'warning'
  1046. });
  1047. return
  1048. }
  1049. if (this.radio === 1) {
  1050. if (this.content == '') {
  1051. this.$notify({
  1052. title: '提示',
  1053. duration: 1800,
  1054. message: '请输入拒绝理由',
  1055. type: 'warning'
  1056. });
  1057. return
  1058. }
  1059. }
  1060. if (this.radio === 0) {
  1061. if (this.clStatus === '') {
  1062. this.$notify({
  1063. title: '提示',
  1064. duration: 1800,
  1065. message: '请选择处理结果',
  1066. type: 'warning'
  1067. });
  1068. return
  1069. }
  1070. }
  1071. var status = ''
  1072. if (this.radio === 1) {
  1073. status = 1
  1074. } else {
  1075. if (this.clStatus === 0) {
  1076. status = 2
  1077. }
  1078. if (this.clStatus === 1) {
  1079. status = 3
  1080. }
  1081. }
  1082. this.$http({
  1083. url: this.$http.adornUrl('message/auditMessage'),
  1084. method: 'post',
  1085. params: this.$http.adornParams({
  1086. 'messageId': this.messageId,
  1087. 'status': status,
  1088. 'auditContent': this.content
  1089. })
  1090. }).then(({
  1091. data
  1092. }) => {
  1093. if (data.code == 0) {
  1094. this.dialogFormVisible = false
  1095. this.$message({
  1096. message: '操作成功',
  1097. type: 'success',
  1098. duration: 1500,
  1099. onClose: () => {
  1100. this.content = ''
  1101. this.status = -1
  1102. this.dataSelect1()
  1103. }
  1104. })
  1105. } else {
  1106. this.$message({
  1107. message: data.msg,
  1108. type: 'warning',
  1109. duration: 1500,
  1110. onClose: () => {}
  1111. })
  1112. }
  1113. })
  1114. },
  1115. animeDat4() {
  1116. this.dataSelect1()
  1117. },
  1118. // 添加公告
  1119. addNotice(row) {
  1120. if (row) {
  1121. this.titles = '修改',
  1122. this.titleMsg = row.title
  1123. this.urlMsg = row.url
  1124. this.idMsg = row.id
  1125. this.type = Number(row.type)
  1126. } else {
  1127. this.titles = '添加',
  1128. this.titleMsg = ''
  1129. this.urlMsg = ''
  1130. this.idMsg = ''
  1131. this.type = 1
  1132. }
  1133. this.dialogFormVisible1 = true
  1134. },
  1135. refusetoGg() {
  1136. if (this.titleMsg == '') {
  1137. this.$notify({
  1138. title: '提示',
  1139. duration: 1800,
  1140. message: '请输入标题',
  1141. type: 'warning'
  1142. });
  1143. return
  1144. }
  1145. // if (this.urlMsg === '') {
  1146. // this.$notify({
  1147. // title: '提示',
  1148. // duration: 1800,
  1149. // message: '请输入地址',
  1150. // type: 'warning'
  1151. // });
  1152. // return
  1153. // }
  1154. var url = ''
  1155. if (this.titles == '添加') {
  1156. url = 'message/insertMessage'
  1157. } else {
  1158. url = 'message/updateMessage'
  1159. }
  1160. this.$http({
  1161. url: this.$http.adornUrl(url),
  1162. method: 'post',
  1163. data: this.$http.adornData({
  1164. 'title': this.titleMsg,
  1165. 'url': this.urlMsg,
  1166. 'type': this.type,
  1167. 'id': this.idMsg,
  1168. 'state': 1
  1169. })
  1170. }).then(({
  1171. data
  1172. }) => {
  1173. if (data.code == 0) {
  1174. this.dialogFormVisible1 = false
  1175. this.$message({
  1176. message: '操作成功',
  1177. type: 'success',
  1178. duration: 1500,
  1179. onClose: () => {
  1180. this.dataSelect()
  1181. }
  1182. })
  1183. } else {
  1184. this.$message({
  1185. message: data.msg,
  1186. type: 'warning',
  1187. duration: 1500,
  1188. onClose: () => {}
  1189. })
  1190. }
  1191. })
  1192. },
  1193. deleteNotice(row) {
  1194. this.$confirm(`确定删除此条信息?`, '提示', {
  1195. confirmButtonText: '确定',
  1196. cancelButtonText: '取消',
  1197. type: 'warning'
  1198. }).then(() => {
  1199. this.$http({
  1200. url: this.$http.adornUrl('message/deleteMessageById'),
  1201. method: 'post',
  1202. params: this.$http.adornParams({
  1203. 'id': row.id
  1204. })
  1205. }).then(({
  1206. data
  1207. }) => {
  1208. if (data.code == 0) {
  1209. this.$message({
  1210. message: '删除成功',
  1211. type: 'success',
  1212. duration: 1500,
  1213. onClose: () => {
  1214. this.dataSelect()
  1215. }
  1216. })
  1217. } else {
  1218. this.$message({
  1219. message: data.msg,
  1220. type: 'error',
  1221. duration: 1500,
  1222. onClose: () => {}
  1223. })
  1224. }
  1225. })
  1226. }).catch(() => {})
  1227. }
  1228. },
  1229. mounted() {
  1230. this.dataSelect()
  1231. }
  1232. };
  1233. </script>
  1234. <style>
  1235. </style>