select.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <div style="display: inline-block;">
  3. <div tabindex="0" @blur="selectClihide()" style="display: inline-block;" v-if="!wxCope">
  4. <!-- <div :style="'width:' + selectWidth + 'px;height:' + selectHeight + 'px'" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'"> -->
  5. <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
  6. <div :style="`width:${selectWidth}px;min-height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'">
  7. <div v-if="!multiSelect" :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
  8. <TranslationOpenDataText type='userName' :openid='selectName'></TranslationOpenDataText>
  9. </div>
  10. <div v-if="multiSelect" :style="'line-height: '+selectHeight+'px;margin-left: -10px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
  11. <template v-if="multiSelectList.length > 0">
  12. <div v-if="!tile" style="width: 100%">
  13. <template v-if="!expandPersonnel">
  14. <span class="all">
  15. <TranslationOpenDataText type='userName' :openid='multiSelectList[0].name'></TranslationOpenDataText>
  16. <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-1')"></i>
  17. </span>
  18. <span class="all" v-if="multiSelectList.length > 1"> + {{multiSelectList.length - 1}}</span>
  19. </template>
  20. <template v-else>
  21. <span class="all" v-for="(ueseItem, userIndex) in multiSelectList" :key="userIndex">
  22. <TranslationOpenDataText type='userName' :openid='ueseItem.name'></TranslationOpenDataText>
  23. <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-2', userIndex)"></i>
  24. </span>
  25. </template>
  26. </div>
  27. <span v-if="tile" style="width: 100%">
  28. <span class="all" style="margin-right: 6px" v-for="(items, indexs) in multiSelectList" :key="indexs">
  29. <TranslationOpenDataText type='userName' :openid='items.name'></TranslationOpenDataText>
  30. <span v-if="items.jobNumber" class="spanFllat">{{items.jobNumber}}</span>
  31. <i class="el-icon-error" @click.stop="deleteMultiSelectList(indexs)" v-if="!disabled"></i>
  32. </span>
  33. </span>
  34. </template>
  35. <span v-else class="allTwo">{{$t('defaultText.pleaseChoose')}}</span>
  36. </div>
  37. <i :class=" move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
  38. <i v-if="moveIon" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
  39. </div>
  40. </div>
  41. <div ref="selectRefs"></div>
  42. <transition name="el-zoom-in-top">
  43. <!-- <div v-show="show" style="position: relative;z-index: 999;"> -->
  44. <div v-show="show" class="selectBox" :style="`width:${selecsWths}px;top:${selectTop}px;left:${selectLeft}px;`">
  45. <!-- 搜索框 -->
  46. <div class="searchBox" v-if="filterable" :style="`top: ${searchBoxTop}px`">
  47. <el-input placeholder="请输入名称搜索" size="mini" v-model="searchTex" style="width: 100%" @input="searchLick()" @focus="selectCli()"></el-input>
  48. </div>
  49. <div class="transitionBox" :style="filterable ? 'margin: 30px 0;' : ''">
  50. <ul class="transitionBoxUl">
  51. <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item, index)">
  52. <span v-if="!multiSelect" style="width: 100%">
  53. <span v-if="item.name">
  54. <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
  55. </span>
  56. <span v-if="item.auditorName">
  57. <TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText>
  58. </span>
  59. <!-- {{item.name || item.auditorName}} -->
  60. <span v-if="item.jobNumber" class="spanFllat">{{item.jobNumber}}</span>
  61. </span>
  62. <span v-if="multiSelect" style="width: 100%">
  63. <span :class="item.flg ? 'hoverSpan hoverSpanHover' : 'hoverSpan'">
  64. <span style="width: 100%;display: inline-block;">
  65. <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
  66. <!-- {{item.name}} -->
  67. <span v-if="item.jobNumber" class="spanFllat">{{item.jobNumber}}</span>
  68. </span>
  69. <span v-if="item.flg"><i class="el-icon-check"></i></span>
  70. </span>
  71. </span>
  72. </li>
  73. </ul>
  74. </div>
  75. </div>
  76. </transition>
  77. </div>
  78. <div v-if="wxCope" class="waihez">
  79. <!-- <div @click="dianjis()">点击</div> -->
  80. <div :style="`width:${selectWidth}px;height:${selectHeight}px;line-height:${selectHeight}px;background:#fff`" class="select selectDandu" @click="dianjis()">
  81. <span v-if="!multiSelect"><TranslationOpenDataText type='userName' :openid='selectName'></TranslationOpenDataText></span>
  82. <!-- <span>你好</span> -->
  83. </div>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. export default {
  89. props: {
  90. subject:{
  91. type: Array
  92. },
  93. size: {
  94. type: String,
  95. },
  96. subjectId: {
  97. type: [String, Number, Array]
  98. },
  99. wxCope: {
  100. type: Boolean,
  101. default: false,
  102. },
  103. // 是否支持多选
  104. multiSelect: {
  105. type: Boolean,
  106. default: false
  107. },
  108. // 是否平铺 (需要 multiSelect 为 true)
  109. tile: {
  110. type: Boolean,
  111. default: false
  112. },
  113. // 当前页面用到的第几个
  114. distinction: {
  115. type: String,
  116. default: '1',
  117. },
  118. // 真对填写日报单独处理
  119. idx: {
  120. type: String
  121. },
  122. flg: {
  123. type: Boolean,
  124. default: false, // 默认值,不是填写日报
  125. },
  126. // 宽度
  127. widthStr: {
  128. type: String,
  129. default: false
  130. },
  131. // 剩下统一索引
  132. index: {
  133. type: String
  134. },
  135. // 是否禁用
  136. disabled: {
  137. type: Boolean,
  138. default: false
  139. },
  140. // 是否可清空
  141. clearable: {
  142. type: Boolean,
  143. default: false
  144. },
  145. // 是否可搜索
  146. filterable: {
  147. type: Boolean,
  148. default: false
  149. },
  150. // 其他数据
  151. other: {
  152. type: [String, Number, Boolean],
  153. default: false
  154. },
  155. // 是否执行到日报单独的函数
  156. flgs: {
  157. type: Boolean,
  158. default: false
  159. },
  160. // searchBoxTop 搜索框距离顶部的距离
  161. searchBoxTop: {
  162. type: String,
  163. default: '-9'
  164. },
  165. expandPersonnel: { // 多选是否展开
  166. type: Boolean,
  167. default: true
  168. }
  169. },
  170. components: {
  171. selectWidth: '150',
  172. selectHeight: '28'
  173. },
  174. data() {
  175. return {
  176. selectWidth: '150',
  177. selectHeight: '28',
  178. selectFontSize: '12',
  179. show: false, // 下拉框
  180. options: [], // 列表数据
  181. optionsCopy: [], // 列表数据复制
  182. transitionBoxLiIdx: '', // hover 背景色
  183. selectName: this.$t('defaultText.pleaseChoose'), // 显示的文字
  184. classDiv: false, // 获得焦点样式
  185. optionsOId: '', // 选中人的id
  186. dailyListObj: null, // 填写日报的数据
  187. dailyListIndex: null, // 日报点的索引
  188. move: false,
  189. moveIon: false,
  190. multiSelectList: [],
  191. searchTex: '', // 搜索文字
  192. cursor: '', // 搜索的标记(需传给后端)
  193. time: null,//防抖
  194. fistArrList: [], // 第一次进来的人员数组
  195. fistArrListOne: [], // 第一次进来的人员初始数组
  196. selectTop: 0,
  197. selectLeft: 0,
  198. selecsWths: 0,
  199. };
  200. },
  201. computed: {},
  202. watch: {
  203. subject: {
  204. handler(newValue, oldValue) {
  205. this.options = newValue
  206. this.optionsCopy = JSON.parse(JSON.stringify(newValue))
  207. if(this.flg) {
  208. if(newValue) {
  209. this.selectName = newValue[0].auditorName || newValue[0].name
  210. this.optionsOId = newValue[0].auditorId || newValue[0].id
  211. }
  212. }
  213. },
  214. },
  215. // 日报点的索引, 真对填写的日报
  216. idx: {
  217. handler(newValue, oldValue) {
  218. // console.log(newValue, oldValue)
  219. this.dailyListIndex = newValue
  220. },
  221. },
  222. subjectId: {
  223. handler(newValue, oldValue) {
  224. // console.log(newValue, oldValue)
  225. this.optionsOId = newValue
  226. this.multiSelectList = []
  227. if(!this.multiSelect) {
  228. if(this.optionsOId) {
  229. for(let i in this.options) {
  230. if(this.options[i].userId == this.optionsOId || this.options[i].auditorId == this.optionsOId || this.options[i].id == this.optionsOId) {
  231. this.selectName = this.options[i].name || this.options[i].auditorName
  232. }
  233. }
  234. } else {
  235. this.selectName = this.$t('defaultText.pleaseChoose')
  236. }
  237. }
  238. if(this.multiSelect) {
  239. for(var i in this.options) {
  240. for(var j in this.optionsOId) {
  241. if(this.options[i].userId == this.optionsOId || this.options[i].auditorId == this.optionsOId[j] || this.options[i].id == this.optionsOId[j]) {
  242. this.multiSelectList.push(this.options[i])
  243. this.options[i].flg = true
  244. }
  245. }
  246. }
  247. }
  248. },
  249. },
  250. widthStr: {
  251. handler(newValue, oldValue) {
  252. this.selectWidth = newValue
  253. },
  254. }
  255. },
  256. created() {},
  257. mounted() {
  258. if(this.size == 'mini') {
  259. this.selectWidth = '150'
  260. this.selectHeight = '28'
  261. } else if(this.size == 'small') {
  262. this.selectWidth = '191'
  263. this.selectHeight = '32'
  264. } else if(this.size == 'medium') {
  265. this.selectWidth = '205'
  266. this.selectHeight = '40'
  267. this.selectFontSize = '14'
  268. }
  269. if(this.widthStr) {
  270. this.selectWidth = this.widthStr
  271. }
  272. if(this.subject) {
  273. this.options = JSON.parse(JSON.stringify(this.subject))
  274. }
  275. if(this.subjectId) {
  276. this.multiSelectList = []
  277. if(!this.multiSelect) {
  278. this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
  279. for(let i in this.options) {
  280. if(this.options[i].userId == this.optionsOId || this.options[i].auditorId == this.optionsOId || this.options[i].id == this.optionsOId) {
  281. this.selectName = this.options[i].auditorName || this.options[i].name
  282. }
  283. }
  284. }
  285. // console.log(this.options, this.subjectId)
  286. if(this.multiSelect) {
  287. for(var i in this.options) {
  288. for(var j in this.subjectId) {
  289. if(this.options[i].id == this.subjectId[j] || this.options[i].auditorId == this.subjectId[j]) {
  290. this.multiSelectList.push(this.options[i])
  291. this.options[i].flg = true
  292. }
  293. }
  294. }
  295. }
  296. }
  297. // console.log(this.subject, this.subjectId)
  298. var thats = this
  299. var phoneArr = []
  300. setTimeout(()=>{
  301. for(var s in thats.subject) {
  302. phoneArr.push(thats.subject[s].optionsOId || thats.subject[s].auditorId || thats.subject[s].id)
  303. }
  304. thats.fistArrListOne = thats.subject
  305. }, 500)
  306. thats.fistArrList = phoneArr
  307. // console.log(thats.fistArrList)
  308. this.dailyListIndex = this.idx
  309. },
  310. methods: {
  311. dianjis() {
  312. if(!this.disabled) {
  313. let modes = this.multiSelect ? 'multi' : 'single'
  314. let that = this
  315. wx.invoke("selectEnterpriseContact", {
  316. "fromDepartmentId": 0,// 必填,表示打开的通讯录从指定的部门开始展示,-1表示自己所在部门开始, 0表示从最上层开始
  317. "mode": modes,// 必填,选择模式,single表示单选,multi表示多选
  318. "type": ["user"],// 必填,选择限制类型,指定department、user中的一个或者多个
  319. "selectedDepartmentIds": [],// 非必填,已选部门ID列表。用于多次选人时可重入,single模式下请勿填入多个id
  320. "selectedUserIds": []// 非必填,已选用户ID列表。用于多次选人时可重入,single模式下请勿填入多个id
  321. },function(res){
  322. // console.log(res)
  323. if (res.err_msg == "selectEnterpriseContact:ok"){
  324. // console.log(res, '数据来源')
  325. if(typeof res.result == 'string'){
  326. res.result = JSON.parse(res.result) //由于目前各个终端尚未完全兼容,需要开发者额外判断result类型以保证在各个终端的兼容性
  327. }
  328. var selectedUserList = res.result.userList; // 已选的成员列表
  329. var userId = ''
  330. var userName = ''
  331. for (var i = 0; i < selectedUserList.length; i++) {
  332. var user = selectedUserList[i];
  333. userId = user.id; // 已选的单个成员ID
  334. userName = user.name;// 已选的单个成员名称
  335. // console.log(userId, userName)
  336. }
  337. for(var s in that.options) {
  338. if(that.options[s].name == userId) {
  339. that.selectName = userId
  340. that.wxCoper(that.options[s].id)
  341. }
  342. }
  343. }
  344. }
  345. );
  346. }
  347. },
  348. wxCoper(id) {
  349. let obj = {
  350. id: id,
  351. distinction: this.distinction,
  352. index: this.index, // 选中的索引
  353. other: this.other,
  354. name: this.selectName
  355. }
  356. // console.log(obj)
  357. this.$emit("selectCal", obj)
  358. },
  359. selectCli() {
  360. if(!this.disabled) {
  361. this.$refs.selectDiv.focus()
  362. this.classDiv = !this.classDiv
  363. this.show = !this.show
  364. this.move = !this.move
  365. this.searchTex = ''
  366. if(this.optionsCopy.length > 0) {
  367. this.$set(this, 'options', JSON.parse(JSON.stringify(this.optionsCopy)))
  368. }
  369. }
  370. if(this.show) {
  371. this.setSelectlocation()
  372. }
  373. },
  374. setSelectlocation() {
  375. let witdhs = this.$refs.selectRefs.offsetWidth
  376. let tops = this.$refs.selectRefs.getBoundingClientRect().top
  377. let lefts = this.$refs.selectRefs.getBoundingClientRect().left
  378. this.selecsWths = witdhs
  379. this.selectTop = tops + 4
  380. this.selectLeft = lefts
  381. },
  382. selectClihide() {
  383. if(this.classDiv) {
  384. this.transitionBoxLiIdx = ''
  385. this.show = !this.show
  386. this.classDiv = false
  387. this.move = false
  388. if(this.multiSelect) {
  389. let obj = {
  390. // id: nameId,
  391. distinction: this.distinction,
  392. index: this.index, // 选中的索引
  393. other: this.other,
  394. arrUserList: this.multiSelectList,
  395. name: this.selectName
  396. }
  397. this.$emit("selectCal", obj)
  398. this.options = this.fistArrListOne
  399. }
  400. }
  401. },
  402. liMouseOver(index) {
  403. this.transitionBoxLiIdx = index
  404. },
  405. liClick(item, itemIndex) {
  406. // console.log(item, '进来的')
  407. let nameId = item.auditorId || item.id
  408. this.selectName = item.auditorName || item.name
  409. if(!this.multiSelect) {
  410. // console.log('我进来了', this.flg)
  411. if(this.flgs) {
  412. let obj = {
  413. id: nameId,
  414. idx: this.dailyListIndex
  415. }
  416. this.$emit("selectCatCli", obj);
  417. this.options = this.fistArrListOne
  418. } else {
  419. let obj = {
  420. id: nameId,
  421. distinction: this.distinction,
  422. index: this.index, // 选中的索引
  423. other: this.other,
  424. name: this.selectName
  425. }
  426. this.$emit("selectCal", obj)
  427. this.options = this.fistArrListOne
  428. }
  429. this.transitionBoxLiIdx = ''
  430. this.show = false
  431. this.classDiv = false
  432. this.move = false
  433. }
  434. if(this.multiSelect) {
  435. if(this.options[itemIndex].flg) {
  436. this.options[itemIndex].flg = !this.options[itemIndex].flg
  437. for(var i in this.multiSelectList) {
  438. if(this.multiSelectList[i].id == item.id) {
  439. this.multiSelectList.splice(i, 1)
  440. }
  441. }
  442. } else {
  443. this.options[itemIndex].flg = false
  444. this.options[itemIndex].flg = !this.options[itemIndex].flg
  445. this.multiSelectList.push(item)
  446. }
  447. }
  448. },
  449. moveIonDiv() {
  450. if(this.clearable) {
  451. this.moveIon = true
  452. }
  453. },
  454. outIonDiv() {
  455. if(this.clearable) {
  456. this.moveIon = false
  457. }
  458. },
  459. clearDelete() {
  460. if(!this.multiSelect) {
  461. this.selectName = this.$t('defaultText.pleaseChoose')
  462. let obj = {
  463. name: this.$t('defaultText.pleaseChoose'),
  464. id: ''
  465. }
  466. this.liClick(obj)
  467. }
  468. if(this.multiSelect) {
  469. this.multiSelectList = []
  470. let obj = {
  471. distinction: this.distinction,
  472. index: this.index, // 选中的索引
  473. other: this.other,
  474. arrUserList: []
  475. }
  476. for(var i in this.options) {
  477. if(this.options[i].flg) {
  478. this.options[i].flg = false
  479. }
  480. }
  481. this.$emit("selectCal", obj)
  482. this.options = this.fistArrListOne
  483. }
  484. },
  485. deleteMultiSelectList(str, userIndex) {
  486. let userId
  487. if(str == '-1') {
  488. userId = this.multiSelectList[0].id
  489. this.multiSelectList.splice(0, 1)
  490. } else if(str == '-2') {
  491. this.multiSelectList.splice(userIndex, 1)
  492. } else {
  493. userId = this.multiSelectList[str].id
  494. this.multiSelectList.splice(str, 1)
  495. }
  496. for(var i in this.options) {
  497. if(this.options[i].id == userId) {
  498. if(this.options[i].flg) {
  499. this.options[i].flg = false
  500. }
  501. }
  502. }
  503. let obj = {
  504. distinction: this.distinction,
  505. index: this.index, // 选中的索引
  506. other: this.other,
  507. arrUserList: this.multiSelectList,
  508. name: this.selectName
  509. }
  510. this.$emit("selectCal", obj)
  511. this.options = this.fistArrListOne
  512. },
  513. // searchBox() {
  514. // this.selectCli()
  515. // },
  516. // // 搜索
  517. searchLick() {
  518. if (this.time != null) {
  519. clearTimeout(this.time)
  520. }
  521. var that = this
  522. this.time = setTimeout(() => {
  523. that.getSimpleActiveUserList()
  524. }, 500)
  525. },
  526. // 针对 getSimpleActiveUserList 获取所有人员接口
  527. getSimpleActiveUserList() {
  528. this.http.post('/user/getEmployeeList', {
  529. departmentId: -1,
  530. pageIndex: 1,
  531. pageSize: 200,
  532. keyword: this.searchTex,
  533. status: 1,
  534. roleId: '',
  535. cursor: '',
  536. onlyDirect: 0,
  537. },
  538. res => {
  539. if (res.code == "ok") {
  540. var arr = res.data.records.filter((item) => {
  541. if (this.fistArrList.indexOf(item.id) != '-1') {
  542. return item;
  543. }
  544. })
  545. // this.options = arr
  546. // console.log('将要赋值')
  547. var newArr = arr.length > 0 ? arr : res.data.records
  548. this.$set(this, 'options', newArr)
  549. this.cursor = res.data.nextCursor
  550. } else {
  551. this.$message({
  552. message: res.msg,
  553. type: "error"
  554. });
  555. }
  556. },
  557. error => {
  558. this.$message({
  559. message: error,
  560. type: "error"
  561. });
  562. });
  563. }
  564. },
  565. triggerOption(){
  566. },
  567. choose(item,value){
  568. },
  569. };
  570. </script>
  571. <style scoped lang="scss">
  572. .selectBox {
  573. position: fixed;
  574. z-index: 999;
  575. }
  576. .selectDandu {
  577. font-size: 16px;
  578. }
  579. .waihez {
  580. // padding-top: 7px;
  581. // box-sizing: border-box;
  582. // background: #FFF;
  583. display: inline-block;
  584. }
  585. .selectDiv {
  586. border-color: #409EFF !important;
  587. }
  588. .disabledTrue {
  589. background: #F5F7FA !important;
  590. border-radius: 4px;
  591. cursor: not-allowed !important;
  592. position: relative;
  593. }
  594. .disabledFalse .select {
  595. background: #FFF !important;
  596. border-radius: 4px;
  597. }
  598. .select {
  599. -webkit-appearance: none;
  600. // background-color: #FFF;
  601. background-image: none;
  602. border-radius: 4px;
  603. border: 1px solid #DCDFE6;
  604. -webkit-box-sizing: border-box;
  605. box-sizing: border-box;
  606. color: #606266;
  607. display: inline-block;
  608. font-size: inherit;
  609. min-height: 40px;
  610. line-height: 40px;
  611. outline: 0;
  612. padding: 0 15px;
  613. -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
  614. transition: border-color .2s cubic-bezier(.645,.045,.355,1);
  615. width: 100%;
  616. position: relative;
  617. cursor: pointer;
  618. }
  619. .selecttex {
  620. // height: 28px;
  621. line-height: 28px;
  622. text-overflow: ellipsis;
  623. font-size: 12px;
  624. }
  625. .iostu {
  626. position: absolute;
  627. top: 50%;
  628. margin-top: -4px;
  629. right: 8px;
  630. color: #C0C4CC;
  631. transition: All 0.2s ease-in-out;
  632. }
  633. .iostuHover {
  634. transform: rotate(-180deg);
  635. }
  636. .searchBox {
  637. position: absolute;
  638. width: 100%;
  639. top: -9px;
  640. // top: 0px;
  641. }
  642. .transitionBox {
  643. background: #FFF;
  644. position: absolute;
  645. width: 100%;
  646. border-radius: 2em;
  647. border: 1px solid #E4E7ED;
  648. border-radius: 4px;
  649. background-color: #FFF;
  650. box-sizing: border-box;
  651. margin: 5px 0;
  652. box-shadow: 0 2px 12px #dfdfdf;
  653. max-height: 274px;
  654. overflow: auto;
  655. z-index: 500 !important;
  656. }
  657. .transitionBoxUl {
  658. list-style: none;
  659. padding: 6px 0;
  660. margin: 0;
  661. -webkit-box-sizing: border-box;
  662. box-sizing: border-box;
  663. }
  664. .transitionBoxUl li {
  665. font-size: 14px;
  666. padding: 0 20px;
  667. position: relative;
  668. white-space: nowrap;
  669. overflow: hidden;
  670. text-overflow: ellipsis;
  671. color: #606266;
  672. height: 34px;
  673. line-height: 34px;
  674. -webkit-box-sizing: border-box;
  675. box-sizing: border-box;
  676. cursor: pointer;
  677. }
  678. .liHover {
  679. background-color: #F5F7FA;
  680. }
  681. .selecttexXuan {
  682. color: #C0C4CC;;
  683. }
  684. .all {
  685. display: inline-block;
  686. font-size: 10px;
  687. background: #f4f4f5;
  688. height: 20px;
  689. line-height: 24px;
  690. padding: 0px 8px;
  691. color: #909399;
  692. margin-right: 4px;
  693. }
  694. .allTwo {
  695. display: inline-block;
  696. margin-left: 10px;
  697. }
  698. .hoverSpan {
  699. display: flex;
  700. width: 100%;
  701. justify-content: space-between;
  702. }
  703. .hoverSpanHover {
  704. color: #409eff;
  705. font-weight: 700;
  706. }
  707. .spanFllat {
  708. display: inline-block;
  709. float: right;
  710. }
  711. </style>