projectCheckRule.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <div>
  3. <el-button size="small" style="width:120px" type="primary" @click="querySite_Parameter">设 置</el-button>
  4. <el-dialog title="客户查重规则" append-to-body :visible.sync="dialogEditVisible" width="860px">
  5. <el-row :gutter="16">
  6. <el-col :span="24" style="margin-top: -20px">
  7. <span style="color: red">注意:每层的查重条件可多选字段</span>
  8. </el-col>
  9. <el-col :span="24" style="margin-top: 20px">
  10. <div style="width: 50px" class="inline-16">
  11. 第一层:
  12. </div>
  13. <div style="width: 580px;" class="inline-16" >
  14. <el-select v-model="fields1" multiple placeholder="请选择字段" style="width: 100%" size="mini">
  15. <el-option
  16. v-for="item in options"
  17. :key="item.column_name"
  18. :label="item.column_name"
  19. :value="item.column_name">
  20. <span style="float: left">{{ item.column_name }}</span>
  21. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.column_comment?item.column_comment:'' }}</span>
  22. </el-option>
  23. </el-select>
  24. </div>
  25. <div style="width: 100px;" class="inline-16" >
  26. <el-select v-model="relation" placeholder="请选择" style="width: 100%" size="mini">
  27. <el-option
  28. v-for="item in relations"
  29. :key="item.value"
  30. :label="item.label"
  31. :value="item.value">
  32. </el-option>
  33. </el-select>
  34. </div>
  35. <div style="width: 50px" class="inline-16">
  36. 关系
  37. </div>
  38. </el-col>
  39. <el-col :span="24" style="margin-top: 20px">
  40. <div style="width: 50px" class="inline-16">
  41. 第二层:
  42. </div>
  43. <div style="width: 580px;" class="inline-16" >
  44. <el-select v-model="fields2" multiple placeholder="请选择字段" style="width: 100%" size="mini">
  45. <el-option
  46. v-for="item in options"
  47. :key="item.column_name"
  48. :label="item.column_name"
  49. :value="item.column_name">
  50. <span style="float: left">{{ item.column_name }}</span>
  51. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.column_comment?item.column_comment:'' }}</span>
  52. </el-option>
  53. </el-select>
  54. </div>
  55. <div style="width: 100px;" class="inline-16" >
  56. <el-select v-model="relation" placeholder="请选择" style="width: 100%" size="mini">
  57. <el-option
  58. v-for="item in relations"
  59. :key="item.value"
  60. :label="item.label"
  61. :value="item.value">
  62. </el-option>
  63. </el-select>
  64. </div>
  65. <div style="width: 50px" class="inline-16">
  66. 关系
  67. </div>
  68. </el-col>
  69. <el-col :span="24" style="margin-top: 20px">
  70. <div style="width: 50px" class="inline-16">
  71. 第三层:
  72. </div>
  73. <div style="width: 580px;" class="inline-16" >
  74. <el-select v-model="fields3" multiple placeholder="请选择字段" style="width: 100%" size="mini">
  75. <el-option
  76. v-for="item in options"
  77. :key="item.column_name"
  78. :label="item.column_name"
  79. :value="item.column_name">
  80. <span style="float: left">{{ item.column_name }}</span>
  81. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.column_comment?item.column_comment:'' }}</span>
  82. </el-option>
  83. </el-select>
  84. </div>
  85. <div style="width: 100px;" class="inline-16" >
  86. <el-select v-model="relation" placeholder="请选择" style="width: 100%" size="mini">
  87. <el-option
  88. v-for="item in relations"
  89. :key="item.value"
  90. :label="item.label"
  91. :value="item.value">
  92. </el-option>
  93. </el-select>
  94. </div>
  95. <div style="width: 50px" class="inline-16">
  96. 关系
  97. </div>
  98. </el-col>
  99. <el-col :span="24" style="margin-top: 20px">
  100. <span >项目报备成功保护期设置:</span>
  101. </el-col>
  102. <el-col :span="24" style="margin-top: 20px">
  103. <div style="width: 50px" class="inline-16">
  104. 保护期:
  105. </div>
  106. <div style="width: 580px;" class="inline-16" >
  107. <el-select v-model="projectprotectionperiod" placeholder="请选择" style="width: 100%" size="mini">
  108. <el-option
  109. v-for="item in monthOption"
  110. :key="item.value"
  111. :label="item.value"
  112. :value="item.value">
  113. </el-option>
  114. </el-select>
  115. </div>
  116. <div style="width: 50px" class="inline-16">
  117. 个月
  118. </div>
  119. </el-col>
  120. <el-col :span="24" style="margin-top: 20px">
  121. <span style="color: red">项目保护期设为0,则不管控保护期;为1-12,则为保护期限;</span>
  122. </el-col>
  123. </el-row>
  124. <div class="dialog-footer">
  125. <el-button size="small" @click="dialogEditVisible = false" class="normal-btn-width">取 消</el-button>
  126. <el-button size="small" type="warning" class="normal-btn-width btn-warning" @click="onSubmit">确 定</el-button>
  127. </div>
  128. </el-dialog>
  129. </div>
  130. </template>
  131. <script>
  132. export default {
  133. name: "customerCheckRule",
  134. data(){
  135. return {
  136. dialogEditVisible:false,
  137. monthOption:[
  138. {
  139. value:'0',
  140. label: '0'
  141. },
  142. {
  143. value:'1',
  144. label: '1'
  145. },
  146. {
  147. value:'2',
  148. label: '2'
  149. },
  150. {
  151. value:'3',
  152. label: '3'
  153. },
  154. {
  155. value:'4',
  156. label: '4'
  157. },
  158. {
  159. value:'5',
  160. label: '5'
  161. },
  162. {
  163. value:'6',
  164. label: '6'
  165. },
  166. {
  167. value:'7',
  168. label: '7'
  169. },
  170. {
  171. value:'8',
  172. label: '8'
  173. },
  174. {
  175. value:'9',
  176. label: '9'
  177. },
  178. {
  179. value:'10',
  180. label: '10'
  181. },
  182. {
  183. value:'11',
  184. label: '11'
  185. },
  186. {
  187. value:'12',
  188. label: '12'
  189. }
  190. ],
  191. projectprotectionperiod:'0',
  192. options: [],
  193. fields1: [],
  194. fields2: [],
  195. fields3: [],
  196. relations: [{
  197. value:'并且',
  198. label: '并且'
  199. }],
  200. relation:''
  201. }
  202. },
  203. methods:{
  204. querySite_Parameter(){
  205. this.dialogEditVisible = true
  206. this.relation = this.relations[0].value
  207. this.queryTable()
  208. this.queryRule()
  209. },
  210. async queryTable(){
  211. const res = await this.$api.requested({
  212. "classname": "sysmanage.develop.optiontype.optiontype",
  213. "method": "optiontypeselect",
  214. "content": {
  215. "pageNumber": 1,
  216. "pageSize": 50,
  217. "typename": "tablecolumnselect",
  218. "parameter": {
  219. "table_name": "sa_project"
  220. }
  221. }
  222. })
  223. this.options = res.data
  224. },
  225. async onSubmit(){
  226. const res = await this.$api.requested({
  227. "id": "20230408091702",
  228. "content": {
  229. "projectcheckrule": {
  230. "fields1": this.fields1,
  231. "factor1": "and",
  232. "fields2":this.fields2,
  233. "factor2": "and",
  234. "fields3":this.fields3,
  235. "factor3": "and"
  236. },
  237. "projectprotectionperiod":this.projectprotectionperiod
  238. },
  239. })
  240. this.tool.showMessage(res,()=>{
  241. this.$emit('queryRule')
  242. this.dialogEditVisible = false
  243. this.fields1 = []
  244. this.fields2 = []
  245. this.fields3 = []
  246. this.projectprotectionperiod = 0
  247. })
  248. },
  249. onClose(){
  250. this.dialogEditVisible = false
  251. this.fields1 = []
  252. this.fields2 = []
  253. this.fields3 = []
  254. },
  255. /*查重规则*/
  256. async queryRule(){
  257. const res = await this.$api.requested({
  258. "id": "20230410090502",
  259. "content": {},
  260. })
  261. this.fields1 = res.data.projectcheckrule.fields1
  262. this.fields2 = res.data.projectcheckrule.fields2
  263. this.fields3 = res.data.projectcheckrule.fields3
  264. this.projectprotectionperiod= res.data.projectprotectionperiod
  265. }
  266. }
  267. }
  268. </script>
  269. <style scoped>
  270. </style>