gerenZiliao.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. <template>
  2. <view class="jz-content-box">
  3. <view class="upload-img-box">
  4. <jiazhengUpload @getFileUrl="getFileUrl" changjingType="shenfenzheng"></jiazhengUpload>
  5. </view>
  6. <view class="form-label-input">
  7. <view class="phone-form-label"><text class="form-label-require">*</text>手机号</view>
  8. <uni-easyinput type="number" v-model="formData.userName" placeholder="请输入手机号" maxlength="11" />
  9. </view>
  10. <view class="form-label-input">
  11. <view class="phone-form-label"><text class="form-label-require">*</text>姓名</view>
  12. <uni-easyinput v-model="formData.realName" placeholder="请输入姓名" />
  13. </view>
  14. <view class="form-label-input">
  15. <view class="phone-form-label">
  16. <text class="form-label-require">*</text>
  17. <text v-if="formData.idtype ==1">身份证号</text>
  18. <text v-if="formData.idtype ==2">护照号</text>
  19. <icon @click="idCardChange" class="change-icon">切换</icon>
  20. </view>
  21. <uni-easyinput @blur="idCardBlur" v-model="formData.idcard" placeholder="请输入身份证号或护照号" maxlength="18" />
  22. </view>
  23. <view class="form-label-select">
  24. <view class="phone-form-label"><text class="form-label-require">*</text>生日</view>
  25. <uni-datetime-picker type="line" v-model="formData.birthday">
  26. <view class="form-radio-select">
  27. <view>{{formData.birthday}}</view>
  28. <icon></icon>
  29. </view>
  30. </uni-datetime-picker>
  31. </view>
  32. <view class="form-label-select">
  33. <view class="phone-form-label"><text class="form-label-require">*</text>籍贯</view>
  34. <picker mode="multiSelector" :range="multiArray" :range-key="'label'" :value="multiIndex"
  35. @columnchange="bindMultiPickerColumnChange" @change="onPickerConfirm" class="select-picker-box">
  36. <view class="form-radio-select">
  37. <view>{{ formData.jiguanShengName}} {{formData.jiguanShiName}}</view>
  38. <icon></icon>
  39. </view>
  40. </picker>
  41. </view>
  42. <view class="form-label-input">
  43. <view class="phone-form-label"><text class="form-label-require">*</text>身份证地址</view>
  44. <uni-easyinput v-model="formData.hujiDizhi" placeholder="请输入身份证地址" />
  45. </view>
  46. <view class="form-label-select">
  47. <view class="phone-form-label"><text class="form-label-require">*</text>民族</view>
  48. <picker :range="minzuList" mode='selector' :value="formData.minzuIndex" range-key="name"
  49. @change="minzuChange" @cancel="minzuCancel" class="select-picker-box">
  50. <view class="form-radio-select">
  51. <view>{{ formData.minzu.name }}</view>
  52. <icon></icon>
  53. </view>
  54. </picker>
  55. </view>
  56. <view class="form-label-radio">
  57. <view class="phone-form-label"><text class="form-label-require">*</text>性别</view>
  58. <view class="form-radio-group">
  59. <view class="form-radio-item" :class="{genderActive: formData.gender==1}" @click="genderSelect(1)">
  60. 男</view>
  61. <view class="form-radio-item" :class="{genderActive: formData.gender==2}" @click="genderSelect(2)">
  62. 女</view>
  63. </view>
  64. </view>
  65. <view class="form-label-radio form-top-margin flex-start-row">
  66. <view class="phone-form-label"><text class="form-label-require">*</text>学历</view>
  67. <dataChecked :list="xueliList" :selectedIds='formData.xueli.id' mode="single" :showAdd="false"
  68. @change="selectChangeXueliList" />
  69. </view>
  70. <view class="form-label-radio flex-start-row">
  71. <view class="phone-form-label"><text class="form-label-require"></text>婚姻 </view>
  72. <dataChecked :list="hunyinList" mode="single" :selectedIds='formData.hunyin.id' :showAdd="false"
  73. @change="selectChangeHunyinList" />
  74. </view>
  75. <!-- <view class="form-label-input">
  76. <view class="phone-form-label"><text class="form-label-require"></text>通讯地址</view>
  77. <view @click="openMap" class="input-text-row">
  78. <view>{{formData.juzhuDizhi}}</view>
  79. <icon></icon>
  80. </view>
  81. </view> -->
  82. <view class="form-label-select">
  83. <view class="phone-form-label"><text class="form-label-require"></text>星座</view>
  84. <picker :range="xingzuoList" mode='selector' :value="formData.xingzuoIndex" range-key="name"
  85. @change="xingzuoChange" @cancel="xingzuoCancel" class="select-picker-box">
  86. <view class="form-radio-select">
  87. <view>{{ formData.xingzuo.name }}</view>
  88. <icon></icon>
  89. </view>
  90. </picker>
  91. </view>
  92. <view class="form-label-select">
  93. <view class="phone-form-label"><text class="form-label-require"></text>属相</view>
  94. <picker :range="shuxiangList" mode='selector' :value="formData.shuxiangIndex" range-key="name"
  95. @change="shuxiangChange" @cancel="shuxiangCancel" class="select-picker-box">
  96. <view class="form-radio-select">
  97. <view>{{ formData.shuxiang.name }}</view>
  98. <icon></icon>
  99. </view>
  100. </picker>
  101. </view>
  102. <view class="form-label-switch">
  103. <view class="phone-form-label"> <text class="form-label-require"></text>星座属相展示到简历 </view>
  104. <view>展示
  105. <switch @change="switchXingzuoChange" :checked="formData.xingzuoFlag" color="#3fd2a1"
  106. style="transform:scale(0.7)" />
  107. </view>
  108. </view>
  109. <view class="agree-section-box form-top-margin">
  110. <checkbox-group @change="handleAgree">
  111. <label class="checkbox">
  112. <checkbox :checked="formData.agree" color="#3fd2a1" style="transform:scale(0.65)" />
  113. <text>已征得本人同意,将其个人资料信息录入平台</text>
  114. </label>
  115. </checkbox-group>
  116. <button type="default" v-if="status =='add'" @click="goNext" class="phone-green-btn">下一步</button>
  117. <button type="default" v-if="status =='edit'" @click="editSave" class="phone-green-btn">保存</button>
  118. </view>
  119. <uni-popup ref="popupMap" background-color="#fff" :is-mask-click="false" :mask-click="false">
  120. <customMap style="100vh" @xuanzeAdress="xuanzeAdress" @close="mapClose"></customMap>
  121. </uni-popup>
  122. </view>
  123. </template>
  124. <script>
  125. import dataChecked from './common/dataChecked.vue';
  126. import jiazhengUpload from "./common/jiazhengUpload.vue"
  127. import customMap from "@/components/customMap/customMap.vue"
  128. import {
  129. getJiazhengXueli,
  130. getJiazhengHunyin,
  131. getJiazhengMinzu,
  132. getJiazhengShuxiang,
  133. getJiazhengXingzuo,
  134. getJiazhengJiguan,
  135. jiazhengIdcard,
  136. jiazhengCheck
  137. } from "@/api/jiazheng.js";
  138. export default {
  139. components: {
  140. dataChecked,
  141. jiazhengUpload,
  142. customMap
  143. },
  144. props: {
  145. status: {
  146. type: String,
  147. }
  148. },
  149. data() {
  150. return {
  151. formData: {
  152. userName: '',
  153. realName: '',
  154. idcard: '',
  155. icon: '',
  156. birthday: '',
  157. hujiDizhi: '',
  158. idtype: '1',
  159. gender: '',
  160. juzhuDizhi: '',
  161. shenfenzhengUrl: '',
  162. minzu: {},
  163. shuxiang: {
  164. },
  165. xingzuo: {
  166. },
  167. hunyin: {
  168. name: '',
  169. },
  170. xueli: {
  171. },
  172. jiguanObj: {},
  173. jiguanShengId: '',
  174. jiguanShiId: '',
  175. jiguanShiName: '',
  176. jiguanShengName: '',
  177. agree: false,
  178. xingzuoIndex: 0,
  179. minzuIndex: 0,
  180. shuxiangIndex: 0,
  181. xingzuoFlag: false
  182. },
  183. selectedIds: [],
  184. ceshidata: '',
  185. xueliList: [],
  186. hunyinList: [],
  187. shuxiangList: [],
  188. xingzuoList: [],
  189. minzuList: [],
  190. // areaTree: [],
  191. multiArray: [
  192. [],
  193. []
  194. ], // 初始化两列数据
  195. multiIndex: [0, 0], // 初始化选中索引
  196. allData: [], // 存储后端返回的完整数据
  197. }
  198. },
  199. created() {
  200. uni.showLoading({
  201. title: '加载中'
  202. });
  203. this.initRequests()
  204. },
  205. methods: {
  206. xuanzeAdress(data) {
  207. console.log('data', data);
  208. this.formData.juzhuDizhi = data
  209. this.mapClose()
  210. },
  211. openMap() {
  212. this.$refs.popupMap.open('bottom')
  213. },
  214. mapClose() {
  215. this.$refs.popupMap.close()
  216. },
  217. idCardBlur() {
  218. let req = {
  219. idcard: this.formData.idcard,
  220. };
  221. jiazhengCheck(req).then(res => {
  222. if (res.code == 0) {
  223. console.log(res);
  224. if (res.data.userId != 0) {
  225. this.$nextTick(() => {
  226. this.formData.userName = res.data.userName
  227. this.formData.realName = res.data.realName
  228. this.formData.idcard = res.data.idcard
  229. this.formData.idtype = res.data.idtype
  230. this.formData.jiguanObj.jiguanShengId = res.data.jiguanShengId
  231. this.formData.jiguanShengName = res.data.jiguanShengName
  232. this.formData.jiguanObj.jiguanShiId = res.data.jiguanShiId
  233. this.formData.jiguanShiName = res.data.jiguanShiName
  234. this.formData.juzhuDizhi = res.data.juzhuDizhi
  235. this.formData.birthday = res.data.birthday
  236. this.formData.minzu = this.dataForId(this.minzuList, res.data.minzu) || ''
  237. this.formData.gender = res.data.gender
  238. this.formData.xueli = this.dataForId(this.xueliList, res.data.xueli) || ''
  239. this.formData.hunyin = this.dataForId(this.hunyinList, res.data.hunyin) || ''
  240. this.formData.hujiDizhi = res.data.hujiDizhi
  241. this.formData.juzhuDizhi = res.data.juzhuDizhi
  242. this.formData.xingzuo = this.dataForId(this.xingzuoList, res.data.xingzuo) ||''
  243. this.formData.shuxiang = this.dataForId(this.shuxiangList, res.data.xingzuo) ||''
  244. this.formData.xingzuoFlag = res.data.xingzuoFlag
  245. this.$emit('idCardBlur', res.data);
  246. });
  247. } else {
  248. }
  249. } else {
  250. this.$message.error('');
  251. return false;
  252. }
  253. });
  254. },
  255. async initRequests() {
  256. try {
  257. await Promise.all([
  258. this.getXueli(),
  259. this.getHunyin(),
  260. this.getMinzu(),
  261. this.getXingzuo(),
  262. this.getShuxiang(),
  263. this.getJiguan(),
  264. ]);
  265. uni.hideLoading();
  266. if (this.status == 'edit') {
  267. this.$emit('finishDom', 'gerenZiliao');
  268. }
  269. } catch (e) {
  270. uni.hideLoading();
  271. uni.showToast({
  272. title: `请求失败!`,
  273. icon: 'none',
  274. duration: 2000
  275. })
  276. }
  277. },
  278. editinfo(data) {
  279. this.$nextTick(() => {
  280. this.formData.userName = data.userName
  281. this.formData.realName = data.realName
  282. this.formData.idcard = data.idcard
  283. this.formData.idtype = data.idtype
  284. this.formData.jiguanObj.jiguanShengId = data.jiguanShengId
  285. this.formData.jiguanShengName = data.jiguanShengName
  286. this.formData.jiguanObj.jiguanShiId = data.jiguanShiId
  287. this.formData.jiguanShiName = data.jiguanShiName
  288. this.formData.juzhuDizhi = data.juzhuDizhi
  289. this.formData.birthday = data.birthday
  290. this.formData.minzu = this.dataForId(this.minzuList, data.minzu) || ''
  291. this.formData.gender = data.gender
  292. this.formData.xueli = this.dataForId(this.xueliList, data.xueli) || ''
  293. this.formData.hunyin = this.dataForId(this.hunyinList, data.hunyin) || ''
  294. this.formData.hujiDizhi = data.hujiDizhi
  295. this.formData.juzhuDizhi = data.juzhuDizhi
  296. this.formData.xingzuo = this.dataForId(this.xingzuoList, data.xingzuo) || ''
  297. this.formData.shuxiang = this.dataForId(this.shuxiangList, data.xingzuo) || ''
  298. this.formData.xingzuoFlag = data.xingzuoFlag
  299. })
  300. },
  301. dataForId(list, id) {
  302. return list.find(item => item.id == id);
  303. },
  304. idCardChange(data) {
  305. this.formData.idtype = this.formData.idtype == 1 ? 2 : 1;
  306. },
  307. getJiguan() {
  308. getJiazhengJiguan({}).then(res => {
  309. // this.areaTree = res.data
  310. // this.pickerData = this.formatData(res.data);
  311. this.allData = res.data;
  312. const provinces = this.allData.map(province => ({
  313. label: province.lable,
  314. value: province.id,
  315. children: province.children,
  316. }));
  317. const cities = this.allData[0].children.map(city => ({
  318. label: city.lable,
  319. value: city.id,
  320. }));
  321. // 回显已选中的城市(假设已选中的城市 id 是 1301)
  322. //this.setSelectedCity(1301);
  323. this.multiArray = [provinces, cities];
  324. //console.log('this.pickerData', this.pickerData);
  325. }).catch(error => {
  326. console.error('获取技能类型失败:', error);
  327. });
  328. },
  329. bindMultiPickerColumnChange(e) {
  330. const {
  331. column,
  332. value
  333. } = e.detail;
  334. // 更新 multiIndex
  335. this.multiIndex[column] = value;
  336. // 如果是第一列(省份)发生变化,更新第二列(城市)
  337. if (column === 0) {
  338. const selectedProvince = this.multiArray[0][value];
  339. const cities = selectedProvince.children.map(city => ({
  340. label: city.lable,
  341. value: city.id,
  342. }));
  343. // 更新 multiArray 和 multiIndex
  344. this.multiArray[1] = cities;
  345. this.multiIndex[1] = 0; // 重置城市列为第一个选项
  346. }
  347. // 强制更新视图
  348. //this.$forceUpdate();
  349. },
  350. // 确认选择时获取完整数据
  351. onPickerConfirm() {
  352. const [provinceIndex, cityIndex] = this.multiIndex;
  353. const selectedProvince = this.multiArray[0][provinceIndex];
  354. const selectedCity = this.multiArray[1][cityIndex];
  355. console.log("选中的省份完整数据:", selectedProvince);
  356. console.log("选中的城市完整数据:", selectedCity);
  357. this.formData.jiguanShengId = selectedProvince ? selectedProvince.value : ''
  358. this.formData.jiguanShiId = selectedCity ? selectedCity.value : ''
  359. this.formData.jiguanShiName = selectedCity ? selectedCity.label : ''
  360. this.formData.jiguanShengName = selectedProvince ? selectedProvince.label : ''
  361. this.formData.jiguanObj.jiguanShengId = selectedProvince ? selectedProvince.value : ''
  362. this.formData.jiguanObj.jiguanShiId = selectedCity ? selectedCity.value : ''
  363. },
  364. setSelectedCity(cityId) {
  365. for (let i = 0; i < this.allData.length; i++) {
  366. const province = this.allData[i];
  367. for (let j = 0; j < province.children.length; j++) {
  368. const city = province.children[j];
  369. if (city.id === cityId) {
  370. // 设置选中的省份和城市索引
  371. this.multiIndex = [i, j];
  372. // 更新 multiArray 的第二列(城市)
  373. const cities = province.children.map(city => ({
  374. label: city.lable,
  375. value: city.id,
  376. }));
  377. this.multiArray[1] = cities;
  378. // 强制更新视图
  379. this.$forceUpdate();
  380. return;
  381. }
  382. }
  383. }
  384. },
  385. checkAllFields() {
  386. const requiredFields = [{
  387. key: 'userName',
  388. name: '手机号'
  389. },
  390. {
  391. key: 'realName',
  392. name: '姓名'
  393. },
  394. {
  395. key: 'idcard',
  396. name: '身份证号'
  397. },
  398. {
  399. key: 'birthday',
  400. name: '生日'
  401. },
  402. // {
  403. // key: 'hometown',
  404. // name: '家乡',
  405. // type: 'array'
  406. // },
  407. // {
  408. // key: 'hujiDizhi',
  409. // name: '身份证地址'
  410. // },
  411. {
  412. key: 'gender',
  413. name: '性别'
  414. },
  415. // {
  416. // key: 'juzhuDizhi',
  417. // name: '通讯地址'
  418. // },
  419. {
  420. key: 'minzu',
  421. name: '民族',
  422. type: 'object'
  423. },
  424. {
  425. key: 'jiguanObj',
  426. name: '籍贯',
  427. type: 'object'
  428. },
  429. {
  430. key: 'xueli',
  431. name: '学历',
  432. type: 'object'
  433. },
  434. // {
  435. // key: 'shuxiang',
  436. // name: '属相',
  437. // type: 'object'
  438. // },
  439. // {
  440. // key: 'xingzuo',
  441. // name: '星座',
  442. // type: 'object'
  443. // },
  444. ]
  445. for (const field of requiredFields) {
  446. const value = this.formData[field.key]
  447. // 根据不同类型进行存在验证
  448. if (field.type === 'array' && !value?.length) {
  449. this.showAlert(field.name)
  450. return false
  451. }
  452. if (field.type === 'object' && !Object.keys(value).length) {
  453. this.showAlert(field.name)
  454. return false
  455. }
  456. if (field.type === 'boolean' && value !== true) {
  457. this.showAlert(field.name)
  458. return false
  459. }
  460. if (!field.type && !value?.toString().trim()) {
  461. this.showAlert(field.name)
  462. return false
  463. }
  464. }
  465. return true
  466. },
  467. showAlert(fieldName) {
  468. uni.showToast({
  469. title: `${fieldName}不能为空`,
  470. icon: 'none',
  471. duration: 2000
  472. })
  473. },
  474. getXueli() {
  475. getJiazhengXueli({}).then(res => {
  476. this.xueliList = res.data
  477. // console.log('xueliList', this.xueliList);
  478. }).catch(error => {
  479. console.error('获取技能类型失败:', error);
  480. });
  481. },
  482. getXingzuo() {
  483. getJiazhengXingzuo({}).then(res => {
  484. this.xingzuoList = res.data
  485. // console.log('xingzuoList', this.xingzuoList);
  486. }).catch(error => {
  487. console.error('获取技能类型失败:', error);
  488. });
  489. },
  490. getShuxiang() {
  491. getJiazhengShuxiang({}).then(res => {
  492. this.shuxiangList = res.data
  493. // console.log('shuxiangList', this.shuxiangList);
  494. }).catch(error => {
  495. console.error('获取技能类型失败:', error);
  496. });
  497. },
  498. getHunyin() {
  499. getJiazhengHunyin({}).then(res => {
  500. this.hunyinList = res.data
  501. // console.log('hunyinList', this.hunyinList);
  502. }).catch(error => {
  503. console.error('获取技能类型失败:', error);
  504. });
  505. },
  506. getMinzu() {
  507. getJiazhengMinzu({}).then(res => {
  508. this.minzuList = res.data
  509. // console.log('minzuList', this.minzuList);
  510. }).catch(error => {
  511. console.error('获取技能类型失败:', error);
  512. });
  513. },
  514. getFileUrl(data) {
  515. this.formData.shenfenzhengUrl = data
  516. console.log('data', data);
  517. jiazhengIdcard({
  518. url: this.formData.shenfenzhengUrl
  519. }).then(res => {
  520. console.log('res', res);
  521. if (res.code == 0) {
  522. this.formData.realName = res.data.name
  523. this.formData.gender = res.data.genderId
  524. this.formData.minzu.name = res.data.ethnicity
  525. this.formData.minzu.id = res.data.minzuId
  526. this.formData.birthday = res.data.birthDate
  527. this.formData.hujiDizhi = res.data.address
  528. this.formData.idcard = res.data.idNumber
  529. this.formData.shuxiang.id = res.data.shuxiangId
  530. this.formData.shuxiang.name = res.data.shuxiangName
  531. this.formData.xingzuo.id = res.data.xingzuoId
  532. this.formData.xingzuo.name = res.data.xingzuoName
  533. this.formData.jiguanShengId = res.data.jiguanShengId
  534. this.formData.jiguanShiId = res.data.jiguanShiId
  535. this.formData.jiguanShengName = res.data.jiguanShengName
  536. this.formData.jiguanShiName = res.data.jiguanShiName
  537. this.formData.jiguanObj.jiguanShengId = res.data.jiguanShengId
  538. this.formData.jiguanObj.jiguanShiId = res.data.jiguanShiId
  539. }
  540. })
  541. },
  542. minzuChange(e) {
  543. const index = e.detail.value
  544. this.formData.minzu = this.minzuList[index]
  545. //console.log('this.formData.minzu', this.formData.minzu);
  546. },
  547. minzuCancel() {
  548. this.formData.minzuIndex = 0
  549. },
  550. xingzuoChange(e) {
  551. const index = e.detail.value
  552. this.formData.xingzuo = this.xingzuoList[index]
  553. // console.log('this.formData.xingzuo', this.formData.xingzuo);
  554. },
  555. xingzuoCancel() {
  556. this.formData.xingzuoIndex = 0
  557. },
  558. shuxiangChange(e) {
  559. const index = e.detail.value
  560. this.formData.shuxiang = this.shuxiangList[index]
  561. //console.log('this.formData.shuxiang', this.formData.shuxiang);
  562. },
  563. shuxiangCancel() {
  564. this.formData.shuxiangIndex = 0
  565. },
  566. selectChangeXueliList(data) {
  567. this.formData.xueli = data[0]
  568. },
  569. genderSelect(data) {
  570. this.formData.gender = data
  571. },
  572. selectChangeHunyinList(data) {
  573. console.log('data', data[0]);
  574. this.formData.hunyin = data[0]
  575. },
  576. switchXingzuoChange(e) {
  577. this.formData.xingzuoFlag = e.detail.value
  578. },
  579. goNext() {
  580. console.log('formData', this.formData);
  581. if (!this.checkAllFields()) {
  582. return false
  583. }
  584. if (!this.formData.agree) {
  585. uni.showToast({
  586. title: "请勾选本人同意!",
  587. icon: 'none',
  588. duration: 2000
  589. })
  590. return false
  591. }
  592. this.$emit('goNext', this.formData, 0);
  593. },
  594. editSave() {
  595. console.log('formData', this.formData);
  596. if (!this.checkAllFields()) {
  597. return false
  598. }
  599. if (!this.formData.agree) {
  600. uni.showToast({
  601. title: "请勾选本人同意!",
  602. icon: 'none',
  603. duration: 2000
  604. })
  605. return false
  606. }
  607. this.$emit('editSave', this.formData);
  608. },
  609. handleAgree(e) {
  610. this.formData.agree = e.detail.value.length > 0
  611. },
  612. }
  613. }
  614. </script>